Documentation ¶
Index ¶
- Variables
- type BucketLookupType
- type Config
- type Credentials
- type Storage
- func (s *Storage) CheckBucket() error
- func (s *Storage) Close() error
- func (s *Storage) Conn() *minio.Client
- func (s *Storage) CreateBucket() error
- func (s *Storage) Delete(key string) error
- func (s *Storage) Get(key string) ([]byte, error)
- func (s *Storage) RemoveBucket() error
- func (s *Storage) Reset() error
- func (s *Storage) Set(key string, val []byte, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ Bucket: "goe-bucket", Endpoint: "", Region: "", BucketLookup: BucketLookupAuto, Token: "", Secure: false, Reset: false, MaxRetry: minio.MaxRetry, Credentials: Credentials{}, GetObjectOptions: minio.GetObjectOptions{}, PutObjectOptions: minio.PutObjectOptions{}, ListObjectsOptions: minio.ListObjectsOptions{}, RemoveObjectOptions: minio.RemoveObjectOptions{}, }
ConfigDefault is the default config
Functions ¶
This section is empty.
Types ¶
type BucketLookupType ¶
type BucketLookupType int
BucketLookupType is type of url lookup supported by server.
const ( BucketLookupAuto BucketLookupType = iota BucketLookupDNS BucketLookupPath )
Different types of url lookup supported by the server.Initialized to BucketLookupAuto
type Config ¶
type Config struct { // Bucket // Default fiber-bucket Bucket string // Endpoint is a host name or an IP address Endpoint string // Region Set this value to override region cache // Optional Region string // BucketLookup Set this value to BucketLookupDNS or BucketLookupPath to override the default bucket lookup // Optional, Default is BucketLookupAuto BucketLookup BucketLookupType // Token Set this value to provide x-amz-security-token (AWS S3 specific) // Optional, Default is false Token string // Secure If set to true, https is used instead of http. // Default is false Secure bool // Reset clears any existing keys in existing Bucket // Optional. Default is false Reset bool // The maximum number of times requests that encounter retryable failures should be attempted. // Optional. Default is 10, same as the MinIO client. MaxRetry int // Credentials Minio access key and Minio secret key. // Need to be defined Credentials Credentials // GetObjectOptions Options for GET requests specifying additional options like encryption, If-Match GetObjectOptions minio.GetObjectOptions // PutObjectOptions // Allows user to set optional custom metadata, content headers, encryption keys and number of threads for multipart upload operation. PutObjectOptions minio.PutObjectOptions // ListObjectsOptions Options per to list objects ListObjectsOptions minio.ListObjectsOptions // RemoveObjectOptions Allows user to set options RemoveObjectOptions minio.RemoveObjectOptions }
Config defines the config for storage.
type Credentials ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage interface that is implemented by storage providers
func (*Storage) CheckBucket ¶
CheckBucket Check to see if bucket already exists
func (*Storage) CreateBucket ¶
CreateBucket Bucket not found so Make a new bucket
func (*Storage) RemoveBucket ¶
RemoveBucket Bucket remove if bucket is empty
Click to show internal directories.
Click to hide internal directories.