Versions in this module Expand all Collapse all v1 v1.0.0 Mar 29, 2022 Changes in this version + const LogError + const LogFatal + const LogInfo + const LogWarn + const Version + var MethodDelete = "DELETE" + var MethodGet = "GET" + var MethodHead = "HEAD" + var MethodPatch = "PATCH" + var MethodPost = "POST" + var MethodPut = "PUT" + var SchemeHttp = "http" + var SchemeHttps = "https" + type Config struct + Endpoint string + Scheme string + Timeout time.Duration + func NewConfig() *Config + func (c *Config) SetEndpoint(endpoint string) + func (c *Config) SetScheme(scheme string) + func (c *Config) SetTimeout(timeout time.Duration) + type Credential struct + AccessKey string + SecretKey string + func NewCredentials(accessKey, secretKey string) *Credential + type DefaultLogger struct + Level int + func NewDefaultLogger(level int) *DefaultLogger + func (logger DefaultLogger) Log(level int, message ...interface{}) + type DummyLogger struct + func NewDummyLogger() *DummyLogger + func (logger DummyLogger) Log(level int, message ...interface{}) + type Logger interface + Log func(level int, message ...interface{}) + type NCloudClient struct + Config Config + Credential Credential + Logger Logger + Revision string + ServiceName string + func (c NCloudClient) Send(method, path, data string) ([]byte, error) + type NCloudRequest struct + Method string + Path string + func (n NCloudRequest) GetMethod() string + func (n NCloudRequest) GetPath() string + type RefreshStatus int + const RefreshStatusFailed + const RefreshStatusRuning + const RefreshStatusSuccess + type RequestInterface interface + GetMethod func() string + GetPath func() string + type Signer struct + Credentials Credential + func NewSigner(credsProvider Credential) *Signer + func (s *Signer) Sign(path string) (signer, timestamp string)