Documentation ¶
Overview ¶
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
FileSystem http.FileSystem
)
Functions ¶
func GetLocalFilePath ¶
func GetLocalFilePath() string
func SaveOrUpdateConfig ¶
func SaveOrUpdateConfig(y *CacheConfig) error
func SyncOnceCenterType ¶
func SyncOnceCenterType()
func SyncOnceOssTye ¶
func SyncOnceOssTye()
Types ¶
type CacheConfig ¶
type CacheConfig struct { Local *LocalOss `yaml:"local" dc:"本地存储文件"` MinioOss *MinioOss `yaml:"minioOss" dc:"minio存储"` TencentOss *TencentOss `yaml:"tencentOss" dc:"腾讯oss存储"` }
type LocalOss ¶
type LocalOss struct {
FilePath string `yaml:"filePath" default:"./storage" dc:"本地存储文件路径"`
}
func GetLocalOssConfig ¶
func GetLocalOssConfig() *LocalOss
type MinioOss ¶
type MinioOss struct { Endpoint string `yaml:"endpoint" dc:"minio服务地址"` SecretID string `yaml:"secretID" dc:"服务 ID"` SecretKey string `yaml:"secretKey" dc:"服务 Key"` Region string `yaml:"region" dc:"存储地区区域"` UseSSL bool `yaml:"useSSL" dc:"服务协议类型,默认不支持ssl"` }
func GetMinioOssConfig ¶
func GetMinioOssConfig() *MinioOss
type TencentOss ¶
type TencentOss struct { Endpoint string `yaml:"endpoint" dc:"minio服务地址" tg:"https://<bucket>.cos.<region>.myqcloud.com"` AppId string `yaml:"appid" dc:"appid" eg:"COS_APPID"` SecretID string `yaml:"secretID" default:"WJmxZupuAPEBWcrI" dc:"服务 ID" eg:"COS_SECRETID"` SecretKey string `yaml:"secretKey" dc:"服务 Key" eg:"COS_SECRETKEY"` Region string `yaml:"region" dc:"存储地区区域" eg:"guangzhou"` }
func GetTencentOssConfig ¶
func GetTencentOssConfig() *TencentOss
Click to show internal directories.
Click to hide internal directories.