Documentation ¶
Index ¶
Constants ¶
View Source
const ( RepoTypeFile = "file" RepoTypeSQLite = "sqlite" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Init(ctx context.Context) error ListBucket(ctx context.Context) ([]string, error) LoadAll(ctx context.Context, bucket string) ([]*model.SoiData, error) Load(ctx context.Context, bucket string, hash string) (*model.SoiData, bool, error) Store(ctx context.Context, bucket string, soi *model.SoiData) error Exists(ctx context.Context, bucket string, hash string) (bool, error) Remove(ctx context.Context, bucket string, hash string) error }
func NewFilesRepository ¶
func NewFilesRepository(path string) (Repository, error)
func NewRepository ¶
func NewSQLiteRepository ¶
func NewSQLiteRepository(ctx context.Context, basePath, bucket string) (Repository, error)
Click to show internal directories.
Click to hide internal directories.