Documentation ¶
Index ¶
- type Config
- type GoMinio
- func (o *GoMinio) BucketExists(bucketName string) (bool, error)
- func (o *GoMinio) CreateBucket(ctx context.Context, bucketName string, location string) error
- func (o *GoMinio) FGetObject(ctx context.Context, objectName, saveFilePath string, ...) error
- func (o *GoMinio) FPutObject(ctx context.Context, objectName, filePath string, ...) (*minio.UploadInfo, error)
- func (o *GoMinio) ListBuckets() ([]minio.BucketInfo, error)
- func (o *GoMinio) ListObjects(bucketName string, opts *minio.ListObjectsOptions) <-chan minio.ObjectInfo
- func (o *GoMinio) PresignedGetObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (u *url.URL, err error)
- type Oss
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessKeyId string `json:",optional" yaml:"AccessKeyId"` AccessKeySecret string `json:",optional" yaml:"AccessKeySecret"` Endpoint string `json:",optional" yaml:"Endpoint"` Bucket string `json:",optional" yaml:"Bucket"` Dir string `json:",optional" yaml:"Dir"` Domain string `json:",optional" yaml:"Domain,optional"` UseSSL bool `json:",optional" yaml:"UseSSL"` }
type GoMinio ¶
type GoMinio struct {
// contains filtered or unexported fields
}
func (*GoMinio) CreateBucket ¶
func (*GoMinio) FGetObject ¶
func (*GoMinio) FPutObject ¶
func (*GoMinio) ListBuckets ¶
func (*GoMinio) ListObjects ¶
type Oss ¶
type Oss interface { Init(conf Config) *GoMinio Client() *minio.Client FPutObject(ctx context.Context, objectName string, sourceFilePath string, options *minio.PutObjectOptions) (*minio.UploadInfo, error) FGetObject(ctx context.Context, objectName, saveFilePath string, options *minio.GetObjectOptions) error ListObjects(bucketName string, opts *minio.ListObjectsOptions) <-chan minio.ObjectInfo ListBuckets() ([]minio.BucketInfo, error) CreateBucket(ctx context.Context, bucketName string, location string) error // 生成原始下载地址 PresignedGetObject(bucketName, objectName string, expiry time.Duration, reqParams url.Values) (u *url.URL, err error) }
Click to show internal directories.
Click to hide internal directories.