Documentation ¶
Index ¶
- Constants
- Variables
- func NewClientConfig(url, user, key string, l *log.Logger) (*clientConfig, error)
- func NewGenericRequest(action string, method string) *genericRequest
- func NewResponseBuilder() responseBuilder
- type Client
- type ClientUrlBuilder
- type DatetimeProvider
- type ErrorResponse
- type FakeClient
- type HashHmacRequestSignature
- type HeadErrorResponse
- type Request
- type Response
- type ResponseBuilder
- type SuccessResponse
Constants ¶
View Source
const MethodGET = "GET"
View Source
const MethodPOST = "POST"
View Source
const V1 = "1.0"
View Source
const V2 = "2.0"
Variables ¶
View Source
var (
NoHttp200ResponseError = errors.New("unexpected response")
)
Errors
View Source
var (
NotSupportedMethod = errors.New("unsupported method")
)
Errors
Functions ¶
func NewClientConfig ¶
func NewGenericRequest ¶
func NewResponseBuilder ¶
func NewResponseBuilder() responseBuilder
Types ¶
type ClientUrlBuilder ¶
func NewClientUrlBuilder ¶
func NewClientUrlBuilder(clientConfig clientConfig) ClientUrlBuilder
type DatetimeProvider ¶
type DatetimeProvider interface {
// contains filtered or unexported methods
}
type ErrorResponse ¶
type ErrorResponse struct { HeadObject HeadErrorResponse `json:"Head"` Head []byte }
func (ErrorResponse) GetBody ¶
func (er ErrorResponse) GetBody() []byte
func (ErrorResponse) GetHead ¶
func (er ErrorResponse) GetHead() []byte
func (ErrorResponse) GetHeadObject ¶
func (er ErrorResponse) GetHeadObject() interface{}
func (ErrorResponse) IsError ¶
func (er ErrorResponse) IsError() bool
type FakeClient ¶ added in v1.1.0
func (FakeClient) Call ¶ added in v1.1.0
func (c FakeClient) Call(request Request) (Response, error)
func (FakeClient) GetLogger ¶ added in v1.1.0
func (c FakeClient) GetLogger() *log.Logger
type HashHmacRequestSignature ¶
type HashHmacRequestSignature interface {
// contains filtered or unexported methods
}
type HeadErrorResponse ¶ added in v1.1.0
type ResponseBuilder ¶
type SuccessResponse ¶
func (SuccessResponse) GetBody ¶
func (sr SuccessResponse) GetBody() []byte
func (SuccessResponse) GetHead ¶
func (sr SuccessResponse) GetHead() []byte
func (SuccessResponse) GetHeadObject ¶
func (sr SuccessResponse) GetHeadObject() interface{}
func (SuccessResponse) IsError ¶
func (sr SuccessResponse) IsError() bool
Click to show internal directories.
Click to hide internal directories.