Documentation
¶
Index ¶
- Constants
- Variables
- func IsInvalid(err error) bool
- func Parse(data []byte) (File, Preview, error)
- func Validate(ctx context.Context, f File) error
- func WriteAtomic(path string, data []byte) error
- type File
- type Pending
- type Preview
- type Service
- func (s Service) Export(ctx context.Context, kind string) ([]byte, error)
- func (s Service) List(ctx context.Context) ([]Pending, error)
- func (s Service) Restore(ctx context.Context, f File) error
- func (s Service) Review(ctx context.Context, id string, approve bool) error
- func (s Service) Submit(ctx context.Context, data []byte, proposer string, allowFull bool) (Pending, error)
Constants ¶
View Source
const MaxSize = 16 << 20
View Source
const SchemaVersion = 1
Variables ¶
View Source
var ErrInvalid = errors.New("invalid backup")
Functions ¶
func WriteAtomic ¶
WriteAtomic writes one private backup in the data directory and fsyncs it before rename.
Types ¶
Click to show internal directories.
Click to hide internal directories.