// ObjectStore (backend) interface // // Licensed under CC0 1.0 Universal: // https://creativecommons.org/publicdomain/zero/1.0/legalcode package objectstore import ( "fmt" ) type ObjectStore interface { CreateObject(bucketId string, objectId string, content []byte) error GetObject(bucketId string, objectId string) (string, error) DeleteObject(bucketId string, objectId string) error } type DuplicateError struct { ObjectId string } func (e *DuplicateError) Error() string { return fmt.Sprintf("Duplicate of the '%v' object", e.ObjectId) } func NewDuplicateError(objectId string) error { return &DuplicateError{ ObjectId: objectId, } }