mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-10 14:39:50 +00:00
33 lines
776 B
Go
33 lines
776 B
Go
package ecloudsdkcore
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type APIKey struct {
|
|
Key string
|
|
Prefix string
|
|
}
|
|
|
|
type Configuration struct {
|
|
BasePath string `json:"basePath,omitempty"`
|
|
Host string `json:"host,omitempty"`
|
|
Scheme string `json:"scheme,omitempty"`
|
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
|
UserAgent string `json:"userAgent,omitempty"`
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
func NewConfiguration() *Configuration {
|
|
cfg := &Configuration{
|
|
BasePath: "https://ecloud.10086.cn/",
|
|
DefaultHeader: make(map[string]string),
|
|
UserAgent: "Ecloud-SDK/1.0.0/go",
|
|
}
|
|
return cfg
|
|
}
|
|
|
|
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
|
c.DefaultHeader[key] = value
|
|
}
|