Documentation
¶
Index ¶
- func Configure()
- func Count(ctx context.Context, bucketName, startAfter string) (int, error)
- func Delete(ctx context.Context, o *Object) error
- func Exists(ctx context.Context, bucketName, key string) (bool, error)
- func JoinPath(parts []string, delimiter string) string
- func PathPrefix(key string, delimiter string) string
- func SplitPath(key, delimiter string) []string
- func Write(ctx context.Context, o *Object, w io.Writer) error
- type CreateCommand
- type Object
- func Copy(ctx context.Context, src *Object, destKey string) (*Object, error)
- func Create(ctx context.Context, bucketId string, cmd CreateCommand) (*Object, error)
- func CreateWithChunk(ctx context.Context, bucketId, chunkId string, cmd CreateCommand) (*Object, error)
- func FindMany(ctx context.Context, bucketName string, keys []string, deleted bool) ([]*Object, error)
- func FindOne(ctx context.Context, bucketName, key string, deleted bool) (*Object, error)
- func List(ctx context.Context, bucketName, startAfter string, limit int) ([]*Object, error)
- func Update(ctx context.Context, o *Object, cmd UpdateCommand) (*Object, error)
- func UpdateFromCopy(ctx context.Context, src, dest *Object) (*Object, error)
- type PrefixIndex
- type Stats
- type UpdateCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathPrefix ¶ added in v0.2.0
Types ¶
type CreateCommand ¶
type Object ¶
type Object struct {
ID string
Bucket string
Key string
ETag string
ContentType string
Size int64
CreatedAt time.Time
Deleted bool
CurrentVersion string
}
func CreateWithChunk ¶
func CreateWithChunk(ctx context.Context, bucketId, chunkId string, cmd CreateCommand) (*Object, error)
CreateWithChunk Creates an object from an existing chunk. This operation does not increase the chunk's reference count.
type PrefixIndex ¶
type PrefixIndex struct {
CommonPrefixes []string
// contains filtered or unexported fields
}
func NewPrefixIndex ¶
func NewPrefixIndex(delimiter, prefix string) *PrefixIndex
func (*PrefixIndex) AddKey ¶
func (i *PrefixIndex) AddKey(key string) bool
AddKey adds a key to the index. The method returns true if this is a key match
type UpdateCommand ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.