Documentation ¶
Index ¶
- Constants
- func Client() *resty.Client
- func ContextWith(ctx context.Context, key interface{}, value interface{}) context.Context
- func ContextWithRequestID(ctx context.Context, requestID string) context.Context
- func Execute(request *resty.Request, method, url string, body interface{}, resp interface{}) (int, models.Err)
- func ParseResponse(r *resty.Response, obj interface{}) models.Err
- func Request(ctx context.Context) *resty.Request
- func RequestIdFromContext(ctx context.Context) string
- func RequestWithID(ctx context.Context, requestID string) *resty.Request
- type ContextKey
- type DataWrapperResponse
- type FContext
- type FError
Constants ¶
View Source
const (
HeaderKeyRequestID = "X-Request-Id"
)
Variables ¶
This section is empty.
Functions ¶
func ContextWith ¶
func ContextWithRequestID ¶
func ParseResponse ¶
func RequestIdFromContext ¶
func RequestWithID ¶
Types ¶
type ContextKey ¶
type ContextKey string
const ( ContextKeyBasicAuth ContextKey = "ck_basic_auth" ContextKeyBearerAuth ContextKey = "ck_bearer_auth" ContextKeyRequestID ContextKey = "ck_request_id" )
type DataWrapperResponse ¶
type DataWrapperResponse struct { FError Data *json.RawMessage `json:"data"` }
Click to show internal directories.
Click to hide internal directories.