mirror of
https://github.com/kopia/kopia.git
synced 2026-04-30 19:03:38 -04:00
godoc cleanup, hiding internal APIs
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
.DS_Store
|
||||
.release/
|
||||
.releases/
|
||||
cmd/playground/
|
||||
kopia-*.tar.gz
|
||||
kopia-*.zip
|
||||
combined.cov
|
||||
|
||||
2
Makefile
2
Makefile
@@ -24,7 +24,7 @@ play:
|
||||
go run cmd/playground/main.go
|
||||
|
||||
lint:
|
||||
-golint github.com/kopia/kopia/...
|
||||
golint github.com/kopia/kopia/...
|
||||
|
||||
vet:
|
||||
go tool vet -all .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
The 'kopia' utility supports creating and accessing backups from command line.
|
||||
Command-line tool for creating and accessing backups.
|
||||
|
||||
Usage:
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
|
||||
"github.com/kopia/kopia/repo"
|
||||
"github.com/kopia/kopia/storage/storagetesting"
|
||||
)
|
||||
|
||||
func main() {
|
||||
d := map[string][]byte{}
|
||||
|
||||
s := storagetesting.NewMapStorage(d)
|
||||
f := repo.Format{
|
||||
Version: 1,
|
||||
MaxBlobSize: 100,
|
||||
ObjectFormat: "TESTONLY_MD5",
|
||||
}
|
||||
r, err := repo.NewRepository(s, &f)
|
||||
if err != nil {
|
||||
log.Fatalf("Err: %v", err)
|
||||
}
|
||||
w := r.NewWriter(repo.WithDescription("tester"))
|
||||
|
||||
w.Write(bytes.Repeat([]byte("a"), 5000))
|
||||
result, err := w.Result(true)
|
||||
log.Printf("result: %v", result.UIString())
|
||||
|
||||
log.Printf("attempting to open")
|
||||
|
||||
rdr, err := r.Open(result)
|
||||
if err != nil {
|
||||
log.Fatalf("open: %v", err)
|
||||
}
|
||||
log.Printf("len: %v\n", rdr.Length())
|
||||
log.Printf("----")
|
||||
// for k, v := range d {
|
||||
// log.Printf("%v = %v", k, string(v))
|
||||
// }
|
||||
|
||||
rdr.Close()
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// +build !windows
|
||||
|
||||
// Package fuse implements Node FUSE filesystem APIs for mounting contents of filesystem stored in repository.
|
||||
package fuse
|
||||
|
||||
import (
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
"testing"
|
||||
|
||||
"github.com/kopia/kopia/internal/jsonstream"
|
||||
"github.com/kopia/kopia/internal/storagetesting"
|
||||
"github.com/kopia/kopia/storage"
|
||||
"github.com/kopia/kopia/storage/storagetesting"
|
||||
)
|
||||
|
||||
func testFormat() *Format {
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
"github.com/kopia/kopia/storage"
|
||||
|
||||
"github.com/kopia/kopia/internal/storagetesting"
|
||||
"github.com/kopia/kopia/storage/logging"
|
||||
"github.com/kopia/kopia/storage/storagetesting"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package filesystem implements filesystem-based Storage.
|
||||
package filesystem
|
||||
|
||||
import (
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/kopia/kopia/storage/storagetesting"
|
||||
"github.com/kopia/kopia/internal/storagetesting"
|
||||
)
|
||||
|
||||
func TestFileStorage(t *testing.T) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package gcs implements Storage based on Google Cloud Storage bucket.
|
||||
package gcs
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Package logging implements wrapper around Storage that logs all activity.
|
||||
package logging
|
||||
|
||||
import (
|
||||
@@ -6,9 +7,10 @@
|
||||
"github.com/kopia/kopia/storage"
|
||||
)
|
||||
|
||||
// Printfer is
|
||||
// Printfer supports emitting formatted strings to arbitrary outputs.
|
||||
// The formatting language must be compatible with fmt.Sprintf().
|
||||
type Printfer interface {
|
||||
Printf(string, ...interface{})
|
||||
Printf(fmt string, args ...interface{})
|
||||
}
|
||||
|
||||
type loggingStorage struct {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/kopia/kopia/storage/storagetesting"
|
||||
"github.com/kopia/kopia/internal/storagetesting"
|
||||
)
|
||||
|
||||
func TestLoggingStorage(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user