Documentation
¶
Index ¶
Constants ¶
View Source
const ( AliOss OssType = "alioss" ZijieOss OssType = "zijieoss" AliossSelfDomainHostKey = "alioss.selfDomainHost" ZijieSelfDomainHostKey = "zijie.oss.selfDomainHost" AliEndpointPublicKey = "alioss.endpoint.public" ZijieEndpointPublicKey = "zijie.oss.endpoint.public" AlinativePrefixKey = "alioss.nativePrefix" ZijienativePrefixKey = "zijie.oss.nativePrefix" DefaultAliPrefix = "/alioss-core/" DefaultZijiePrefix = "/zijie-core/" AlibucketNameKey = "alioss.bucketName" ZijieBucketNameKey = "zijie.oss.bucketName" )
Variables ¶
This section is empty.
Functions ¶
func GetFileName ¶
func SubStringBlackSlash ¶
Types ¶
type OssClient ¶
type OssClient interface {
NewDefaultClient() (OssClient, error)
GetNativeWithPrefixUrl(fileName string) string
GetNativePrefix() string
GetFullUrlWithSign(fileName string, expiredInSec int64) (string, error)
GetFullUrl(fileName string) string
Upload(key string, reader io.Reader, isPrivate bool) (fileName string, err error)
UploadFromUrl(urlStr string, isPrivate bool) (string, error)
UploadOverwrite(key string, reader io.Reader, isPrivate bool) (fileName string, err error)
UploadFile(fileName string, file *os.File, isPrivate bool) (string, error)
GetBytes(fileName string) ([]byte, error)
GetBase64(fileName string) (string, error)
UploadFileBytes(fileName string, bs []byte, isPrivate bool) (string, error)
UploadFileWithFullUrl(fileName string, file *os.File, isPrivate bool) (string, error)
UploadFileBytesWithFullUrl(fileName string, bs []byte, isPrivate bool) (string, error)
UploadFileBytesWithNativeFullUrl(fileName string, bs []byte, isPrivate bool) (string, error)
UploadFileWithNativeFullUrl(fileName string, file *os.File, isPrivate bool) (string, error)
DelObject(fileName string) (bool, error)
IsObjectExist(key string) (bool, error)
UploadByReq(req *UploadReq) (string, error)
}
func GetDefault ¶
func NewDefault ¶
type StorageType ¶ added in v0.13.29
type StorageType string
const ( // StorageClassStandard Standard provides highly reliable, highly available, // and high-performance object storage for data that is frequently accessed. StorageTypeStandard StorageType = "Standard" // StorageClassIA IA provides highly durable storage at lower prices compared with Standard. // IA has a minimum billable size of 64 KB and a minimum billable storage duration of 30 days. StorageTypeIA StorageType = "IA" // StorageClassArchive Archive provides high-durability storage at lower prices compared with Standard and IA. // Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 60 days. StorageTypeArchive StorageType = "Archive" // StorageClassColdArchive Cold Archive provides highly durable storage at lower prices compared with Archive. // Cold Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 180 days. StorageTypeColdArchive StorageType = "ColdArchive" // StorageClassDeepColdArchive Deep Cold Archive provides highly durable storage at lower prices compared with Cold Archive. // Deep Cold Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 180 days. StorageTypeDeepColdArchive StorageType = "DeepColdArchive" //bytedance StorageClassArchiveFr StorageType = "ARCHIVE_FR" StorageClassIntelligentTiering StorageType = "INTELLIGENT_TIERING" )
Click to show internal directories.
Click to hide internal directories.