Documentation ¶
Overview ¶
Package minio provides Helper type to initialize minio client, as well as retrieve resources or resource info with a url string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMinioClient ¶
NewMinioClient creates a new minio client. If accesskey and secretkey are provided, they are used to create the client. Otherwise, AWS EC2 IAM role credentials will be used instead.
Types ¶
type Config ¶
type Config struct { Endpoint string `json:"endpoint"` AccessKey string `json:"accesskey"` SecretKey string `json:"secretkey"` Secure bool `json:"secure"` Region string `json:"region"` }
Config is used to create a minio client.
type Helper ¶
type Helper struct { Client *minio.Client BucketName string Prefix string // contains filtered or unexported fields }
Helper provides the interface to the S3 compatible backend.
func NewMinioHelperWithBucket ¶
func NewMinioHelperWithBucket(config Config, bucketName string, prefix string, maxAttempts int) (Helper, error)
NewMinioHelperWithBucket creates a new minio.Helper object.
func (*Helper) GetBucketNameAndPrefix ¶
GetBucketNameAndPrefix infers the bucket name and prefix from the url.
func (*Helper) GetObject ¶
GetObject retrieves the metadata and data from the S3 compatible backend.
func (*Helper) StatObject ¶
StatObject retrieves the metadata (only) from a S3 compatible backend.
func (*Helper) TestConnection ¶
TestConnection test connection to backend
type ResourceInfo ¶
type ResourceInfo = core.ResourceInfo
ResourceInfo is an alias for core.ResourceInfo
type ServeHandler ¶
type ServeHandler = core.ServeHandler
ServeHandler is an alias for core.ServeHandler