Documentation
¶
Index ¶
Constants ¶
View Source
const ShortDateLayout = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
func NewMockHttpHandler ¶
Types ¶
type Client ¶
func NewMockClient ¶
func NewMockClient(handler http.HandlerFunc) *Client
type CommonResponse ¶
type CommonResponse struct {
StatusCode int
Code int `json:"code"`
Details []CommonResponseDetail `json:"details"`
Message string `json:"message"`
}
type CommonResponseDetail ¶
type MockHttpClient ¶
type MockHttpClient struct {
// contains filtered or unexported fields
}
func NewMockHttpClient ¶
func NewMockHttpClient(handler http.HandlerFunc) *MockHttpClient
type Response ¶
type Response struct {
CommonResponse
Data interface{}
}
func (Response) CopyCommonResponse ¶
func (r Response) CopyCommonResponse(rhs *CommonResponse)
type TimeFormat ¶
Do not use this structure for responses as there are no ways to unmarshal to any layout and leave nil if json field is null
func NewTimeFormat ¶
func NewTimeFormat(t time.Time, layout string) *TimeFormat
func (*TimeFormat) MarshalJSON ¶
func (rd *TimeFormat) MarshalJSON() ([]byte, error)
func (*TimeFormat) UnmarshalJSON ¶
func (rd *TimeFormat) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.