Documentation
¶
Index ¶
- func BuildProbePayload(injectivePriceOracleAPIProbeBody string, ...) (*injectivepriceoracleapi.ProbePayload, error)
- func DecodeProbeResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeProbeRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func NewInjectivePriceOracleAPIProbeEncoder(encoderFn InjectivePriceOracleAPIProbeEncoderFunc) func(r *http.Request) goahttp.Encoder
- func NewProbeInternal(body *ProbeInternalResponseBody) *goa.ServiceError
- func NewProbeInvalidArg(body *ProbeInvalidArgResponseBody) *goa.ServiceError
- func NewProbeResponseOK(body *ProbeResponseBody) *injectivepriceoracleapi.ProbeResponse
- func NewProbeUnauthorized(body *ProbeUnauthorizedResponseBody) *goa.ServiceError
- func ProbeInjectivePriceOracleAPIPath() string
- func ValidateProbeInternalResponseBody(body *ProbeInternalResponseBody) (err error)
- func ValidateProbeInvalidArgResponseBody(body *ProbeInvalidArgResponseBody) (err error)
- func ValidateProbeResponseBody(body *ProbeResponseBody) (err error)
- func ValidateProbeUnauthorizedResponseBody(body *ProbeUnauthorizedResponseBody) (err error)
- type Client
- type InjectivePriceOracleAPIProbeEncoderFunc
- type ProbeInternalResponseBody
- type ProbeInvalidArgResponseBody
- type ProbeRequestBody
- type ProbeResponseBody
- type ProbeUnauthorizedResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProbePayload ¶
func BuildProbePayload(injectivePriceOracleAPIProbeBody string, injectivePriceOracleAPIProbeKey string) (*injectivepriceoracleapi.ProbePayload, error)
BuildProbePayload builds the payload for the Injective Price Oracle API probe endpoint from CLI flags.
func DecodeProbeResponse ¶
func DecodeProbeResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeProbeResponse returns a decoder for responses returned by the Injective Price Oracle API probe endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeProbeResponse may return the following errors:
- "invalid_arg" (type *goa.ServiceError): http.StatusBadRequest
- "internal" (type *goa.ServiceError): http.StatusInternalServerError
- "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
- error: internal error
func EncodeProbeRequest ¶
func EncodeProbeRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeProbeRequest returns an encoder for requests sent to the Injective Price Oracle API probe server.
func NewInjectivePriceOracleAPIProbeEncoder ¶
func NewInjectivePriceOracleAPIProbeEncoder(encoderFn InjectivePriceOracleAPIProbeEncoderFunc) func(r *http.Request) goahttp.Encoder
NewInjectivePriceOracleAPIProbeEncoder returns an encoder to encode the multipart request for the "Injective Price Oracle API" service "probe" endpoint.
func NewProbeInternal ¶
func NewProbeInternal(body *ProbeInternalResponseBody) *goa.ServiceError
NewProbeInternal builds a Injective Price Oracle API service probe endpoint internal error.
func NewProbeInvalidArg ¶
func NewProbeInvalidArg(body *ProbeInvalidArgResponseBody) *goa.ServiceError
NewProbeInvalidArg builds a Injective Price Oracle API service probe endpoint invalid_arg error.
func NewProbeResponseOK ¶
func NewProbeResponseOK(body *ProbeResponseBody) *injectivepriceoracleapi.ProbeResponse
NewProbeResponseOK builds a "Injective Price Oracle API" service "probe" endpoint result from a HTTP "OK" response.
func NewProbeUnauthorized ¶
func NewProbeUnauthorized(body *ProbeUnauthorizedResponseBody) *goa.ServiceError
NewProbeUnauthorized builds a Injective Price Oracle API service probe endpoint unauthorized error.
func ProbeInjectivePriceOracleAPIPath ¶
func ProbeInjectivePriceOracleAPIPath() string
ProbeInjectivePriceOracleAPIPath returns the URL path to the Injective Price Oracle API service probe HTTP endpoint.
func ValidateProbeInternalResponseBody ¶
func ValidateProbeInternalResponseBody(body *ProbeInternalResponseBody) (err error)
ValidateProbeInternalResponseBody runs the validations defined on probe_internal_response_body
func ValidateProbeInvalidArgResponseBody ¶
func ValidateProbeInvalidArgResponseBody(body *ProbeInvalidArgResponseBody) (err error)
ValidateProbeInvalidArgResponseBody runs the validations defined on probe_invalid_arg_response_body
func ValidateProbeResponseBody ¶
func ValidateProbeResponseBody(body *ProbeResponseBody) (err error)
ValidateProbeResponseBody runs the validations defined on ProbeResponseBody
func ValidateProbeUnauthorizedResponseBody ¶
func ValidateProbeUnauthorizedResponseBody(body *ProbeUnauthorizedResponseBody) (err error)
ValidateProbeUnauthorizedResponseBody runs the validations defined on probe_unauthorized_response_body
Types ¶
type Client ¶
type Client struct {
// Probe Doer is the HTTP client used to make requests to the probe endpoint.
ProbeDoer goahttp.Doer
// CORS Doer is the HTTP client used to make requests to the endpoint.
CORSDoer goahttp.Doer
// RestoreResponseBody controls whether the response bodies are reset after
// decoding so they can be read again.
RestoreResponseBody bool
// contains filtered or unexported fields
}
Client lists the Injective Price Oracle API service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the Injective Price Oracle API service servers.
func (*Client) BuildProbeRequest ¶
BuildProbeRequest instantiates a HTTP request object with method and path set to call the "Injective Price Oracle API" service "probe" endpoint
type InjectivePriceOracleAPIProbeEncoderFunc ¶
type InjectivePriceOracleAPIProbeEncoderFunc func(*multipart.Writer, *injectivepriceoracleapi.ProbePayload) error
InjectivePriceOracleAPIProbeEncoderFunc is the type to encode multipart request for the "Injective Price Oracle API" service "probe" endpoint.
type ProbeInternalResponseBody ¶
type ProbeInternalResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
ProbeInternalResponseBody is the type of the "Injective Price Oracle API" service "probe" endpoint HTTP response body for the "internal" error.
type ProbeInvalidArgResponseBody ¶
type ProbeInvalidArgResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
ProbeInvalidArgResponseBody is the type of the "Injective Price Oracle API" service "probe" endpoint HTTP response body for the "invalid_arg" error.
type ProbeRequestBody ¶
type ProbeRequestBody struct {
// TOML file contents
Content []byte `form:"content" json:"content" xml:"content"`
}
ProbeRequestBody is the type of the "Injective Price Oracle API" service "probe" endpoint HTTP request body.
func NewProbeRequestBody ¶
func NewProbeRequestBody(p *injectivepriceoracleapi.ProbePayload) *ProbeRequestBody
NewProbeRequestBody builds the HTTP request body from the payload of the "probe" endpoint of the "Injective Price Oracle API" service.
type ProbeResponseBody ¶
type ProbeResponseBody struct {
// Result of the probe
Result *string `form:"result,omitempty" json:"result,omitempty" xml:"result,omitempty"`
}
ProbeResponseBody is the type of the "Injective Price Oracle API" service "probe" endpoint HTTP response body.
type ProbeUnauthorizedResponseBody ¶
type ProbeUnauthorizedResponseBody struct {
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
ProbeUnauthorizedResponseBody is the type of the "Injective Price Oracle API" service "probe" endpoint HTTP response body for the "unauthorized" error.