Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var URLTemplate = map[ProviderType]string{ OSS: "https://%s.aliyuncs.com", OOS: "https://oos-%s.ctyunapi.cn", KODO: "https://s3-%s.qiniucs.com", COS: "https://cos.%s.myqcloud.com", OBS: "https://obs.%s.myhuaweicloud.com", BOS: "https://s3.%s.bcebos.com", GCS: "https://storage.googleapis.com", KS3: "https://ks3-%s.ksyuncs.com", }
Functions ¶
Types ¶
type GRPC ¶
type GRPC struct { Addr string `yaml:"addr" json:"addr"` // default: :9090 CertFile string `yaml:"certFile" json:"certFile"` KeyFile string `yaml:"keyFile" json:"keyFile"` Timeout int `yaml:"timeout" json:"timeout"` // default: 10 }
GRPC grpc服务公共配置(选用)
type Listen ¶
type Listen struct { Addr string `yaml:"addr" json:"addr"` CertFile string `yaml:"certFile" json:"certFile"` KeyFile string `yaml:"keyFile" json:"keyFile"` Timeout int `yaml:"timeout" json:"timeout"` // default: 10s Metrics bool `yaml:"metrics" json:"metrics"` Healthz bool `yaml:"healthz" json:"healthz"` Readyz bool `yaml:"readyz" json:"readyz"` Pprof bool `yaml:"pprof" json:"pprof"` }
type Logger ¶
type Logger struct { Type string `yaml:"type" json:"type"` Path string `yaml:"path" json:"path"` Level string `yaml:"level" json:"level"` Stdout string `yaml:"stdout" json:"stdout"` Cap uint `yaml:"cap" json:"cap"` Formatter string `yaml:"formatter" json:"formatter"` }
Logger logger配置
type OAuth2 ¶
type OAuth2 struct { Issuer string `yaml:"issuer" json:"issuer"` ClientID string `yaml:"clientID" json:"clientID"` ClientSecret string `yaml:"clientSecret" json:"clientSecret"` Scopes []string `yaml:"scopes" json:"scopes"` RedirectURL string `yaml:"redirectURL" json:"redirectURL"` }
OAuth2 holds the configuration for the OAuth2 provider.
func (*OAuth2) GetClientID ¶
GetClientID returns the OAuth2 client ID.
func (*OAuth2) GetClientSecret ¶
GetClientSecret returns the OAuth2 client secret.
func (*OAuth2) GetOAuth2Config ¶
GetOAuth2Config returns an oauth2.Config.
func (*OAuth2) GetRedirectURL ¶
GetRedirectURL returns the OAuth2 redirect URL.
type ProviderType ¶ added in v0.0.3
type ProviderType string
const ( S3 ProviderType = "s3" //aws s3 OSS ProviderType = "oss" //aliyun oss OOS ProviderType = "oos" //ctyun oos KODO ProviderType = "kodo" //qiniu kodo COS ProviderType = "cos" //tencent cos OBS ProviderType = "obs" //huawei obs BOS ProviderType = "bos" //baidu bos GCS ProviderType = "gcs" //google gcs fixme:not tested KS3 ProviderType = "ks3" //kingsoft ks3 )
type Storage ¶ added in v0.0.3
type Storage struct { Type ProviderType `yaml:"type"` SigningMethod string `yaml:"signingMethod"` Region string `yaml:"region"` Bucket string `yaml:"bucket"` AccessKeyID string `yaml:"accessKeyID"` SecretAccessKey string `yaml:"secretAccessKey"` // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.