forked from beyondstorage/go-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
37 lines (24 loc) · 1.01 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
Package storage intends to provide a unified storage layer for Golang.
Goals
- Production ready: high test coverage, enterprise storage software adaptation, semantic versioning, well documented.
- High performance: more code generation, less runtime reflect.
- Vendor agnostic: more generic abstraction, less internal details.
Examples
The most common case to use a Storager service could be following:
1. Init a storager.
store, err := fs.NewStorager(pairs.WithWorkDir("/tmp"))
if err != nil {
log.Fatalf("service init failed: %v", err)
}
2. Use Storager API to maintain data.
var buf bytes.Buffer
n, err := store.Read("path/to/file", &buf)
if err != nil {
log.Printf("storager read: %v", err)
}
*/
package storage
//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -o ./cmd/definitions/bindata/bindata.go -pkg bindata -tags tools ./definitions ./cmd/definitions/tmpl
//go:generate go run -tags tools ./cmd/definitions
//go:generate go run -tags tools ./internal/cmd/iterator