Documentation
¶
Index ¶
- Variables
- type Manager
- type Mock
- func (m *Mock) AddObject(_ context.Context, namespace, container, versionID, key, casKey string) error
- func (m *Mock) CreateContainer(_ context.Context, namespace, name string, ttl time.Duration) error
- func (m *Mock) CreateNamespace(_ context.Context, name string) error
- func (m *Mock) CreateVersion(_ context.Context, namespace, container string) (id string, err error)
- func (m *Mock) DeleteContainer(_ context.Context, namespace, name string) error
- func (m *Mock) DeleteNamespace(ctx context.Context, name string) error
- func (m *Mock) DeleteObject(_ context.Context, namespace, container, versionID, key string) error
- func (m *Mock) DeleteVersion(_ context.Context, namespace, container, id string) error
- func (m *Mock) EnsureBLOBPresenceOrGetUploadURL(ctx context.Context, checksum string, size uint64, mimeType string) (string, error)
- func (m *Mock) GetObjectURL(ctx context.Context, namespace, container, versionID, key string) (string, error)
- func (m *Mock) ListAllVersions(_ context.Context, namespace, container string) ([]models.Version, error)
- func (m *Mock) ListContainers(_ context.Context, namespace string) ([]models.Container, error)
- func (m *Mock) ListContainersByPage(_ context.Context, namespace string, pageNum uint64) (uint64, []models.Container, error)
- func (m *Mock) ListNamespaces(ctx context.Context) ([]string, error)
- func (m *Mock) ListObjects(_ context.Context, namespace, container, versionID string) ([]string, error)
- func (m *Mock) ListObjectsByPage(_ context.Context, namespace, container, versionID string, pageNum uint64) (uint64, []string, error)
- func (m *Mock) ListPublishedVersions(_ context.Context, namespace, container string) ([]models.Version, error)
- func (m *Mock) ListPublishedVersionsByPage(_ context.Context, namespace, container string, pageNum uint64) (uint64, []models.Version, error)
- func (m *Mock) MoveContainer(ctx context.Context, namespace, container, destNamespace string) error
- func (m *Mock) PublishVersion(_ context.Context, namespace, container, id string) error
- func (m *Mock) RenameContainer(_ context.Context, namespace, oldName, newName string) error
- func (m *Mock) RenameNamespace(ctx context.Context, oldName, newName string) error
- func (m *Mock) SetContainerParameters(_ context.Context, namespace, name string, ttl time.Duration) 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
CreateNamespace(ctx context.Context, name string) error
RenameNamespace(ctx context.Context, oldName, newName string) error
DeleteNamespace(ctx context.Context, name string) error
CreateContainer(ctx context.Context, namespace, name string, ttl time.Duration) error
MoveContainer(ctx context.Context, namespace, container, destNamespace string) error
RenameContainer(ctx context.Context, namespace, oldName, newName string) error
DeleteContainer(ctx context.Context, namespace, name string) error
SetContainerParameters(ctx context.Context, namespace, name string, ttl time.Duration) error
CreateVersion(ctx context.Context, namespace, container string) (id string, err error)
ListAllVersions(ctx context.Context, namespace, container string) ([]models.Version, error)
PublishVersion(ctx context.Context, namespace, container, id string) error
DeleteVersion(ctx context.Context, namespace, container, id string) error
AddObject(ctx context.Context, namespace, container, versionID, key string, casKey string) error
ListObjects(ctx context.Context, namespace, container, versionID string) ([]string, error)
DeleteObject(ctx context.Context, namespace, container, versionID, key string) error
EnsureBLOBPresenceOrGetUploadURL(ctx context.Context, checksum string, size uint64, mimeType string) (string, error)
}
func NewManager ¶ added in v0.0.2
func NewManager(mdRepo metadata.Repository, blobRepo blob.Repository) Manager
type Mock ¶
func (*Mock) CreateContainer ¶
func (*Mock) CreateNamespace ¶ added in v0.0.8
func (*Mock) CreateVersion ¶
func (*Mock) DeleteContainer ¶
func (*Mock) DeleteNamespace ¶ added in v0.0.8
func (*Mock) DeleteObject ¶
func (*Mock) DeleteVersion ¶
func (*Mock) EnsureBLOBPresenceOrGetUploadURL ¶
func (*Mock) GetObjectURL ¶
func (*Mock) ListAllVersions ¶
func (*Mock) ListContainers ¶
func (*Mock) ListContainersByPage ¶ added in v0.0.8
func (*Mock) ListNamespaces ¶ added in v0.0.8
func (*Mock) ListObjects ¶
func (*Mock) ListObjectsByPage ¶ added in v0.0.5
func (*Mock) ListPublishedVersions ¶
func (*Mock) ListPublishedVersionsByPage ¶ added in v0.0.4
func (*Mock) MoveContainer ¶ added in v0.0.8
func (*Mock) PublishVersion ¶
func (*Mock) RenameContainer ¶ added in v0.0.8
func (*Mock) RenameNamespace ¶ added in v0.0.8
type Publisher ¶ added in v0.0.2
type Publisher interface {
ListNamespaces(ctx context.Context) ([]string, error)
ListContainers(ctx context.Context, namespace string) ([]models.Container, error)
ListContainersByPage(ctx context.Context, namespace string, pageNum uint64) (uint64, []models.Container, error)
ListPublishedVersions(ctx context.Context, namespace, container string) ([]models.Version, error)
ListPublishedVersionsByPage(ctx context.Context, namespace, container string, pageNum uint64) (uint64, []models.Version, error)
ListObjectsByPage(ctx context.Context, namespace, container, versionID string, pageNum uint64) (uint64, []string, error)
GetObjectURL(ctx context.Context, namespace, container, versionID, key string) (string, error)
}
func NewPublisher ¶ added in v0.0.2
func NewPublisher(mdRepo metadata.Repository, blobRepo blob.Repository, versionsPerPage, objectsPerPage, containersPerPage uint64) Publisher
Click to show internal directories.
Click to hide internal directories.