Documentation
¶
Index ¶
- Variables
- type Manager
- type Mock
- func (m *Mock) AddObject(_ context.Context, container, versionID, key, casKey string) error
- func (m *Mock) CreateContainer(_ context.Context, name string) error
- func (m *Mock) CreateVersion(_ context.Context, container string) (id string, err error)
- func (m *Mock) DeleteContainer(_ context.Context, name string) error
- func (m *Mock) DeleteObject(_ context.Context, container, versionID, key string) error
- func (m *Mock) DeleteVersion(_ context.Context, container, id string) error
- func (m *Mock) EnsureBLOBPresenceOrGetUploadURL(ctx context.Context, checksum string, size int64) (string, error)
- func (m *Mock) GetObjectURL(ctx context.Context, container, versionID, key string) (string, error)
- func (m *Mock) ListAllVersions(_ context.Context, container string) ([]models.Version, error)
- func (m *Mock) ListContainers(context.Context) ([]string, error)
- func (m *Mock) ListObjects(_ context.Context, container, versionID string) ([]string, error)
- func (m *Mock) ListObjectsByPage(_ context.Context, container, versionID string, pageNum uint64) (uint64, []string, error)
- func (m *Mock) ListPublishedVersions(_ context.Context, container string) ([]models.Version, error)
- func (m *Mock) ListPublishedVersionsByPage(_ context.Context, container string, pageNum uint64) (uint64, []models.Version, error)
- func (m *Mock) PublishVersion(_ context.Context, container, id string) error
- type Publisher
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("entity not found")
Functions ¶
This section is empty.
Types ¶
type Manager ¶ added in v0.0.2
type Manager interface {
Publisher
CreateContainer(ctx context.Context, name string) error
DeleteContainer(ctx context.Context, name string) error
CreateVersion(ctx context.Context, container string) (id string, err error)
ListAllVersions(ctx context.Context, container string) ([]models.Version, error)
PublishVersion(ctx context.Context, container, id string) error
DeleteVersion(ctx context.Context, container, id string) error
AddObject(ctx context.Context, container, versionID, key string, casKey string) error
ListObjects(ctx context.Context, container, versionID string) ([]string, error)
DeleteObject(ctx context.Context, container, versionID, key string) error
EnsureBLOBPresenceOrGetUploadURL(ctx context.Context, checksum string, size int64) (string, error)
}
func NewManager ¶ added in v0.0.2
func NewManager(mdRepo metadata.Repository, blobRepo blob.Repository) Manager
type Mock ¶
func (*Mock) CreateVersion ¶
func (*Mock) DeleteObject ¶
func (*Mock) DeleteVersion ¶
func (*Mock) EnsureBLOBPresenceOrGetUploadURL ¶
func (*Mock) GetObjectURL ¶
func (*Mock) ListAllVersions ¶
func (*Mock) ListObjects ¶
func (*Mock) ListObjectsByPage ¶ added in v0.0.5
func (*Mock) ListPublishedVersions ¶
func (*Mock) ListPublishedVersionsByPage ¶ added in v0.0.4
type Publisher ¶ added in v0.0.2
type Publisher interface {
ListContainers(ctx context.Context) ([]string, error)
ListPublishedVersions(ctx context.Context, container string) ([]models.Version, error)
ListPublishedVersionsByPage(ctx context.Context, container string, pageNum uint64) (uint64, []models.Version, error)
ListObjectsByPage(ctx context.Context, container, versionID string, pageNum uint64) (uint64, []string, error)
GetObjectURL(ctx context.Context, container, versionID, key string) (string, error)
}
func NewPublisher ¶ added in v0.0.2
func NewPublisher(mdRepo metadata.Repository, blobRepo blob.Repository, versionsPerPage, objectsPerPage uint64) Publisher
Click to show internal directories.
Click to hide internal directories.