config.go
700 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package oss
type OssConfig struct {
accessID string
accessKey string
roleAcs string
endPoint string
bucketName string
callbackUrl string
sessionName string
hostStr string //host的格式为 bucketname.endpoint
}
func NewOssConfig() *OssConfig {
return &OssConfig{
accessID: "",
accessKey: "",
roleAcs: "",
bucketName: "",
callbackUrl: "",
endPoint: "",
sessionName: "",
hostStr: "",
}
}
func (config *OssConfig) SetBucketName(name string) {
config.bucketName = name
}
func (config *OssConfig) SetCallbackUrl(url string) {
config.callbackUrl = url
}
func (config *OssConfig) SetSessionName(name string) {
config.sessionName = name
}