Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
Name string `model:"name,VARCHAR(4095) PRIMARY KEY"`
Size int64 `model:"size,BIGINT NOT NULL"`
ModTime int64 `model:"mod_time,BIGINT NOT NULL"`
Hash string `model:"hash,VARCHAR(2047) NOT NULL"`
ParityHash string `model:"parity_hash,VARCHAR(2047) NOT NULL"`
HeaderHash string `model:"header_hash,VARCHAR(2047) NOT NULL"`
LastVerifiedAt int64 `model:"last_verified_at,BIGINT NOT NULL"`
}
Model is a content tree model
type Repo ¶
type Repo interface {
New(name string, size int64, modtime int64, hash, parityHash, headerHash string) *Model
Exists(ctx context.Context, name string) (bool, error)
List(ctx context.Context, limit int, after string) ([]Model, error)
Get(ctx context.Context, name string) (*Model, error)
Insert(ctx context.Context, m *Model) error
Update(ctx context.Context, m *Model) error
Delete(ctx context.Context, name string) error
Setup(ctx context.Context) error
}
Repo is a content tree repository
Click to show internal directories.
Click to hide internal directories.