Documentation
¶
Index ¶
Constants ¶
View Source
const ( STORE_TYPE_SWIFT = iota STORE_TYPE_S3 = iota )
View Source
const ( S3_ACCES_KEY = "access_key" S3_SECRET_KEY = "secret_key" S3_ENDPOINT_URL = "endpoint" S3_BUCKET = "bucket_name" )
View Source
const ( SWIFT_AUTH_URL = "auth_url" SWIFT_USER_NAME = "user" SWIFT_API_KEY = "api_key" SWIFT_TENANT = "tenant" SWIFT_TENANT_ID = "tenant_id" SWIFT_STORAGE_URL = "storage_url" SWIFT_AUTH_TOKEN = "auth_token" SWIFT_CONTAINER = "container" )
View Source
const (
FS_ROOT_PATH = "root_path"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type FSStore ¶
type FSStore struct {
// contains filtered or unexported fields
}
func (*FSStore) Delete ¶
func (fs *FSStore) Delete(so *StoredObject) error
type HashReader ¶
type HashReader struct {
// contains filtered or unexported fields
}
func NewHashReader ¶
func NewHashReader(r io.Reader) *HashReader
func (*HashReader) Digest ¶
func (hr *HashReader) Digest() []byte
func (*HashReader) HexDigest ¶
func (hr *HashReader) HexDigest() string
type ObjectStore ¶
type ObjectStore struct {
db.Record
Organization string
Name string
Type int
// contains filtered or unexported fields
}
func NewObjectStore ¶
func NewObjectStore(o *registry.Organization) *ObjectStore
func (*ObjectStore) Create ¶
func (so *ObjectStore) Create() error
func (*ObjectStore) NewObject ¶
func (os *ObjectStore) NewObject() *StoredObject
func (*ObjectStore) Store ¶
func (so *ObjectStore) Store() error
func (*ObjectStore) Validate ¶
func (so *ObjectStore) Validate() error
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
func (*S3Store) Delete ¶
func (s *S3Store) Delete(so *StoredObject) error
type Store ¶
type Store interface {
Put(*StoredObject, io.Reader, int64) error
Get(*StoredObject, io.Writer) error
Delete(*StoredObject) error
}
type StoredObject ¶
type StoredObject struct {
db.Record
User string
Group string
Organization string
StoreName string
Expiration time.Time
Type string
Hash string
Metadata map[string]string
// contains filtered or unexported fields
}
func (*StoredObject) Create ¶
func (so *StoredObject) Create() error
func (*StoredObject) Store ¶
func (so *StoredObject) Store() error
func (*StoredObject) Validate ¶
func (so *StoredObject) Validate() error
type SwiftStore ¶
type SwiftStore struct {
// contains filtered or unexported fields
}
func (*SwiftStore) Delete ¶
func (s *SwiftStore) Delete(so *StoredObject) error
func (*SwiftStore) Get ¶
func (s *SwiftStore) Get(so *StoredObject, data io.Writer) error
func (*SwiftStore) Initialize ¶
func (s *SwiftStore) Initialize(c map[string]string) error
func (*SwiftStore) Put ¶
func (s *SwiftStore) Put(so *StoredObject, data io.Reader, length int64) error
Click to show internal directories.
Click to hide internal directories.