Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinIOClient ¶
type MinIOClient struct { *minio.Client // contains filtered or unexported fields }
func NewMinIOClient ¶
func NewMinIOClient(ctx context.Context, conf *MinIOConfig) *MinIOClient
func (*MinIOClient) Bucket ¶
func (c *MinIOClient) Bucket() string
func (*MinIOClient) Endpoint ¶
func (c *MinIOClient) Endpoint() string
type MinIOConfig ¶
type MinIOConfig struct { Endpoint string `long:"endpoint" env:"ENDPOINT" description:"the endpoint of MinIO server" required:"true"` Bucket string `long:"bucket" env:"BUCKET" description:"the bucket name" required:"true"` Username string `long:"username" env:"USERNAME" description:"the access key id (username) to the MinIO server" required:"true"` Password string `long:"password" env:"PASSWORD" description:"the secret access key (password) to the MinIO server" required:"true"` Insecure bool `long:"insecure" env:"INSECURE" description:"disable HTTPS or not"` Policy string `long:"policy" env:"POLICY" description:"the bucket policy" default:"public"` }
type PutObjectOptions ¶
type PutObjectOptions struct {
ContentType string
}
type Storage ¶
type Storage interface { // Endpoint returns the endpoint of the object storage Endpoint() string // Bucket returns the bucket name in the object storage Bucket() string // PutObject add an object into the storage bucket PutObject(ctx context.Context, objectName string, reader io.Reader, objectSize int64, opts PutObjectOptions) error }
Provide a simplifier interface to upload file
Directories
¶
Path | Synopsis |
---|---|
mock
|
|
storagemock
Package storagemock is a generated GoMock package.
|
Package storagemock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.