Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudStorageConfig ¶
type CloudStorageConfig struct {
Base64Json string `yaml:"base64_json"`
}
type Config ¶
type Config struct { Type DFSType `yaml:"type"` // s3/minio/cloud_storage Enable bool `yaml:"enable"` Bucket string `yaml:"bucket"` ExpireDays TimeDays `yaml:"expire_days"` // 桶数据过期时间 S3 *S3Config `yaml:"s3"` Minio *MinioConfig `yaml:"minio"` CloudStorage *CloudStorageConfig `yaml:"cloud_storage"` Huaweicloud *HuaweiObsConfig `yaml:"huawei_obs"` // deprecated:兼容旧版本配置 Url string `yaml:"url"` // deprecated:兼容旧版本配置 KeyID string `yaml:"key_id"` // deprecated:兼容旧版本配置 Key string `yaml:"key"` }
type DFSHandler ¶
type DFSHandler interface { TryMakeBucket() error PutObject(path, fileName string, payload []byte) error GetObject(path, fileName string) ([]byte, error) DelObject(path, fileName string) error }
func NewHandler ¶
func NewHandler(config *Config) (DFSHandler, error)
type HuaweiObsConfig ¶
type MinioConfig ¶
Click to show internal directories.
Click to hide internal directories.