Skip to content

Commit

Permalink
Add metadata repo interface skeleton (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
teran authored Jul 7, 2024
1 parent a85af99 commit 56e01e7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions repositories/metadata/metadata.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package metadata

import "context"

type Repository interface {
CreateContainer(ctx context.Context, name string) error
ListContainers(ctx context.Context) ([]string, error)
DeleteContainer(ctx context.Context, name string) error

CreateVersion(ctx context.Context, container string) (string, error)
ListAllVersionsByContainer(ctx context.Context, container string) ([]string, error)
ListPublishedVersionsByContainer(ctx context.Context, container string) ([]string, error)
MarkVersionPublished(ctx context.Context, container, version string) error

CreateObject(ctx context.Context, container, version, key, casKey string) error
ListObjects(ctx context.Context, container, version, key string) ([]string, error)
DeleteObject(ctx context.Context, container, version, key string) error
RemapObject(ctx context.Context, container, version, key, newCASKey string) error

CreateBLOB(ctx context.Context, checksum string, size uint64, mimeType string) error
}

0 comments on commit 56e01e7

Please sign in to comment.