static

package
v1.80.0-v2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ObjectTypeUserAvatar = iota
	ObjectTypeStyling
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	InstanceID    string
	ResourceOwner string
	Name          string
	Hash          string
	Size          int64
	LastModified  time.Time
	Location      string
	ContentType   string
}

type CreateStorage

type CreateStorage func(client *sql.DB, rawConfig map[string]interface{}) (Storage, error)

type ObjectType

type ObjectType int32

type Storage

type Storage interface {
	PutObject(ctx context.Context, instanceID, location, resourceOwner, name, contentType string, objectType ObjectType, object io.Reader, objectSize int64) (*Asset, error)
	GetObject(ctx context.Context, instanceID, resourceOwner, name string) ([]byte, func() (*Asset, error), error)
	GetObjectInfo(ctx context.Context, instanceID, resourceOwner, name string) (*Asset, error)
	RemoveObject(ctx context.Context, instanceID, resourceOwner, name string) error
	RemoveObjects(ctx context.Context, instanceID, resourceOwner string, objectType ObjectType) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL