Documentation
¶
Index ¶
- Constants
- func AuthHeaderValue(signature, accessKey string, signedHeaders []string) string
- func DecodeError(statusCode int, body []byte) error
- func ErrorCode(err error) string
- func IsAccessDenied(err error) bool
- func IsNotFound(err error) bool
- func IsProjectNotFound(err error) bool
- func NewHTTPClient() *http.Client
- func ResolveProjectID(ctx context.Context, client *Client, domainID, targetRegion string) (string, error)
- func Sign(req *SignRequest) (map[string]string, error)
- type APIError
- type AccountBalance
- type Client
- type CreateUserOption
- type CreateUserRequest
- type CreateUserResponse
- type ECSServerAddress
- type ECSServerDetail
- type IAMDomain
- type IAMGroup
- type IAMProject
- type IAMUser
- type IAMUserV5
- type ListAuthDomainsResponse
- type ListECSServersDetailsResponse
- type ListGroupsResponse
- type ListProjectsResponse
- type ListRDSInstancesResponse
- type ListRegionsResponse
- type ListUsersResponse
- type ListUsersV5Response
- type Option
- type ProjectNotFoundError
- type RDSDatastore
- type RDSInstance
- type Region
- type Request
- type RetryPolicy
- type ShowCustomerAccountBalancesResponse
- type ShowPermanentAccessKeyResponse
- type ShowUserResponse
- type SignRequest
Constants ¶
View Source
const ( BasicDateFormat = "20060102T150405Z" Algorithm = "SDK-HMAC-SHA256" HeaderXDate = "X-Sdk-Date" HeaderHost = "host" HeaderAuthorization = "Authorization" HeaderContentSha256 = "X-Sdk-Content-Sha256" )
View Source
const (
DefaultTimeout = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func AuthHeaderValue ¶
func DecodeError ¶
func IsAccessDenied ¶ added in v0.2.5
func IsNotFound ¶
func IsProjectNotFound ¶
func NewHTTPClient ¶
Types ¶
type AccountBalance ¶
type CreateUserOption ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
User CreateUserOption `json:"user"`
}
type CreateUserResponse ¶
type ECSServerAddress ¶
type ECSServerDetail ¶
type ECSServerDetail struct {
Status string `json:"status"`
Name string `json:"name"`
Addresses map[string][]ECSServerAddress `json:"addresses"`
}
type IAMProject ¶
type ListAuthDomainsResponse ¶
type ListAuthDomainsResponse struct {
Domains []IAMDomain `json:"domains"`
}
type ListECSServersDetailsResponse ¶
type ListECSServersDetailsResponse struct {
Count int32 `json:"count"`
Servers []ECSServerDetail `json:"servers"`
}
type ListGroupsResponse ¶
type ListGroupsResponse struct {
Groups []IAMGroup `json:"groups"`
}
type ListProjectsResponse ¶
type ListProjectsResponse struct {
Projects []IAMProject `json:"projects"`
}
type ListRDSInstancesResponse ¶
type ListRDSInstancesResponse struct {
Instances []RDSInstance `json:"instances"`
TotalCount *int32 `json:"total_count"`
}
type ListRegionsResponse ¶
type ListRegionsResponse struct {
Regions []Region `json:"regions"`
}
type ListUsersResponse ¶
type ListUsersResponse struct {
Users []IAMUser `json:"users"`
}
type ListUsersV5Response ¶
type ListUsersV5Response struct {
Users []IAMUserV5 `json:"users"`
}
type Option ¶
type Option func(*Client)
func WithBaseURL ¶
func WithHTTPClient ¶
func WithRetryPolicy ¶
func WithRetryPolicy(p RetryPolicy) Option
type ProjectNotFoundError ¶
type ProjectNotFoundError struct {
Region string
}
func (*ProjectNotFoundError) Error ¶
func (e *ProjectNotFoundError) Error() string
type RDSDatastore ¶
type RDSInstance ¶
type RetryPolicy ¶
type RetryPolicy interface {
Do(ctx context.Context, idempotent bool, fn func() (*http.Response, error)) (*http.Response, error)
}
func DefaultRetryPolicy ¶
func DefaultRetryPolicy() RetryPolicy
type ShowCustomerAccountBalancesResponse ¶
type ShowCustomerAccountBalancesResponse struct {
AccountBalances []AccountBalance `json:"account_balances"`
}
type ShowUserResponse ¶
Click to show internal directories.
Click to hide internal directories.