Documentation ¶
Index ¶
- type Minio
- func (m *Minio) ContentType(suf string) (string, error)
- func (m *Minio) DeleteBucket(ctx context.Context, BucketName string) error
- func (m *Minio) DeleteBucketFile(ctx context.Context, BucketName string, FileName string) error
- func (m *Minio) Download(ctx context.Context, bucket string, object string, path string) error
- func (m *Minio) ListBucketObjects(ctx context.Context, BucketName string) []vm.ObjectInfo
- func (m *Minio) ListBuckets(ctx context.Context) ([]vm.BucketInfo, error)
- func (m *Minio) MakeBucket(ctx context.Context, bucket string, policy Policy, location string) error
- func (m *Minio) PreSignedGetObject(ctx context.Context, bucket string, object string, ex time.Duration) (*url.URL, error)
- func (m *Minio) SetBucketPolicy(ctx context.Context, bucket string, policy Policy) error
- func (m *Minio) UploadByByte(ctx context.Context, file io.Reader, size int64, bucket string, object string) (vm.UploadInfo, error)
- func (m *Minio) UploadByName(ctx context.Context, bucket string, object string, file string) (vm.UploadInfo, error)
- type Policy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Minio ¶
type Minio struct {
// contains filtered or unexported fields
}
func (*Minio) DeleteBucket ¶
DeleteBucket : 删除指定bucket
func (*Minio) DeleteBucketFile ¶
DeleteBucketFile : 删除指定bucket下的文件
func (*Minio) Download ¶
Download : 下载文件到本地路径 @params ctx: 上下文 @params bucket: 桶名称 @params object: 文件名称 @params path: 存储路径
func (*Minio) ListBucketObjects ¶
ListBucketObjects : 获取指定bucket下的所有文件
func (*Minio) ListBuckets ¶
ListBuckets : 获取所有bucket
func (*Minio) MakeBucket ¶
func (m *Minio) MakeBucket(ctx context.Context, bucket string, policy Policy, location string) error
MakeBucket : 创建一个桶 @params ctx: 上下文 @params bucket: 桶名称 @params policy: 策略(public、private) @params location: 位置
func (*Minio) PreSignedGetObject ¶
func (m *Minio) PreSignedGetObject(ctx context.Context, bucket string, object string, ex time.Duration) (*url.URL, error)
PreSignedGetObject : 获取文件签名(临时访问路径) @params ctx: 上下文 @params bucket: 桶名称 @params object: 文件名称 @params ex: 过期时间,至少30s,小于30s,则默认30s
func (*Minio) SetBucketPolicy ¶
SetBucketPolicy : 设置桶的访问权限 @params ctx: 上下文 @params bucket: 桶名称 @params policy: 策略(public、private) @return error:
Click to show internal directories.
Click to hide internal directories.