Documentation ¶
Index ¶
- Constants
- func CheckWithCopy(ctx context.Context, handle Handle, srcPath string, business, scene string) (string, error)
- func GetFilePath(scene *SceneInfo, rename bool) (string, error)
- type AliYunOss
- func (a *AliYunOss) CopyFromTempBucket(tempPath, dstPath string) (string, error)
- func (a *AliYunOss) Delete(ctx context.Context, fileDir string, opKv common.OptionKv) error
- func (a *AliYunOss) GetObjectInfo(ctx context.Context, fileDir string) (*common.StorageObjectInfo, error)
- func (a *AliYunOss) GetUrl(filePath string) (string, error)
- func (a *AliYunOss) PrivateBucket() Handle
- func (a *AliYunOss) PublicBucket() Handle
- func (a *AliYunOss) SignedGetUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
- func (a *AliYunOss) SignedPutUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
- func (a *AliYunOss) TemporaryBucket() Handle
- func (a *AliYunOss) Upload(ctx context.Context, filePath string, content io.Reader, opKv common.OptionKv) (string, error)
- type Client
- type Handle
- type Minio
- func (m *Minio) CopyFromTempBucket(tempPath, dstPath string) (string, error)
- func (m *Minio) Delete(ctx context.Context, fileDir string, opKv common.OptionKv) error
- func (m *Minio) GetObjectInfo(ctx context.Context, filePath string) (*common.StorageObjectInfo, error)
- func (m *Minio) GetUrl(path string) (string, error)
- func (m *Minio) IsObjectExist(ctx context.Context, filePath string, opKv common.OptionKv) (bool, error)
- func (m *Minio) PrivateBucket() Handle
- func (m *Minio) PublicBucket() Handle
- func (m *Minio) SignedGetUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
- func (m *Minio) SignedPutUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
- func (m *Minio) TemporaryBucket() Handle
- func (m *Minio) Upload(ctx context.Context, filePath string, reader io.Reader, opKv common.OptionKv) (string, error)
- type OpOption
- type SceneInfo
Constants ¶
View Source
const ( BusinessProductManage = "productManage" //产品管理 SceneProductImg = "productImg" //产品图片 )
产品管理
Variables ¶
This section is empty.
Functions ¶
func CheckWithCopy ¶ added in v0.5.1
Types ¶
type AliYunOss ¶ added in v0.5.1
type AliYunOss struct {
// contains filtered or unexported fields
}
func (*AliYunOss) CopyFromTempBucket ¶ added in v0.5.1
func (*AliYunOss) GetObjectInfo ¶ added in v0.5.1
func (*AliYunOss) PrivateBucket ¶ added in v0.5.1
func (*AliYunOss) PublicBucket ¶ added in v0.5.1
func (*AliYunOss) SignedGetUrl ¶ added in v0.5.1
func (*AliYunOss) SignedPutUrl ¶ added in v0.5.1
func (a *AliYunOss) SignedPutUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
获取put上传url
func (*AliYunOss) TemporaryBucket ¶ added in v0.5.1
type Handle ¶ added in v0.5.1
type Handle interface { SignedPutUrl(ctx context.Context, objectName string, expiredSec int64, opKv common.OptionKv) (string, error) SignedGetUrl(ctx context.Context, objectName string, expiredSec int64, opKv common.OptionKv) (string, error) Delete(ctx context.Context, objectName string, opKv common.OptionKv) error Upload(ctx context.Context, objectName string, reader io.Reader, opKv common.OptionKv) (string, error) GetObjectInfo(ctx context.Context, objectName string) (*common.StorageObjectInfo, error) PrivateBucket() Handle PublicBucket() Handle TemporaryBucket() Handle CopyFromTempBucket(tempPath, dstPath string) (string, error) GetUrl(path string) (string, error) }
type Minio ¶ added in v0.5.1
type Minio struct {
// contains filtered or unexported fields
}
func (*Minio) CopyFromTempBucket ¶ added in v0.5.1
func (*Minio) GetObjectInfo ¶ added in v0.5.1
func (*Minio) IsObjectExist ¶ added in v0.5.1
func (*Minio) PrivateBucket ¶ added in v0.5.1
func (*Minio) PublicBucket ¶ added in v0.5.1
func (*Minio) SignedGetUrl ¶ added in v0.5.1
func (m *Minio) SignedGetUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
获取get下载url
func (*Minio) SignedPutUrl ¶ added in v0.5.1
func (m *Minio) SignedPutUrl(ctx context.Context, fileDir string, expiredSec int64, opKv common.OptionKv) (string, error)
获取put上传url
func (*Minio) TemporaryBucket ¶ added in v0.5.1
Click to show internal directories.
Click to hide internal directories.