client

package
v0.0.0-...-b9360c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeNoopResponse

func DecodeNoopResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeNoopResponse returns a decoder for responses returned by the csv noop endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeNoopResponse may return the following errors:

  • "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
  • "forbidden" (type *goa.ServiceError): http.StatusForbidden
  • "not-found" (type *goa.ServiceError): http.StatusNotFound
  • "bad-request" (type *goa.ServiceError): http.StatusBadRequest
  • error: internal error

func NewNoopBadRequest

func NewNoopBadRequest(body *NoopBadRequestResponseBody) *goa.ServiceError

NewNoopBadRequest builds a csv service noop endpoint bad-request error.

func NewNoopForbidden

func NewNoopForbidden(body *NoopForbiddenResponseBody) *goa.ServiceError

NewNoopForbidden builds a csv service noop endpoint forbidden error.

func NewNoopNotFound

func NewNoopNotFound(body *NoopNotFoundResponseBody) *goa.ServiceError

NewNoopNotFound builds a csv service noop endpoint not-found error.

func NewNoopUnauthorized

func NewNoopUnauthorized(body *NoopUnauthorizedResponseBody) *goa.ServiceError

NewNoopUnauthorized builds a csv service noop endpoint unauthorized error.

func NoopCsvPath

func NoopCsvPath() string

NoopCsvPath returns the URL path to the csv service noop HTTP endpoint.

func ValidateNoopBadRequestResponseBody

func ValidateNoopBadRequestResponseBody(body *NoopBadRequestResponseBody) (err error)

ValidateNoopBadRequestResponseBody runs the validations defined on noop_bad-request_response_body

func ValidateNoopForbiddenResponseBody

func ValidateNoopForbiddenResponseBody(body *NoopForbiddenResponseBody) (err error)

ValidateNoopForbiddenResponseBody runs the validations defined on noop_forbidden_response_body

func ValidateNoopNotFoundResponseBody

func ValidateNoopNotFoundResponseBody(body *NoopNotFoundResponseBody) (err error)

ValidateNoopNotFoundResponseBody runs the validations defined on noop_not-found_response_body

func ValidateNoopUnauthorizedResponseBody

func ValidateNoopUnauthorizedResponseBody(body *NoopUnauthorizedResponseBody) (err error)

ValidateNoopUnauthorizedResponseBody runs the validations defined on noop_unauthorized_response_body

Types

type Client

type Client struct {
	// Noop Doer is the HTTP client used to make requests to the noop endpoint.
	NoopDoer 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 csv 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 csv service servers.

func (*Client) BuildNoopRequest

func (c *Client) BuildNoopRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildNoopRequest instantiates a HTTP request object with method and path set to call the "csv" service "noop" endpoint

func (*Client) Noop

func (c *Client) Noop() goa.Endpoint

Noop returns an endpoint that makes HTTP requests to the csv service noop server.

type NoopBadRequestResponseBody

type NoopBadRequestResponseBody 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"`
}

NoopBadRequestResponseBody is the type of the "csv" service "noop" endpoint HTTP response body for the "bad-request" error.

type NoopForbiddenResponseBody

type NoopForbiddenResponseBody 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"`
}

NoopForbiddenResponseBody is the type of the "csv" service "noop" endpoint HTTP response body for the "forbidden" error.

type NoopNotFoundResponseBody

type NoopNotFoundResponseBody 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"`
}

NoopNotFoundResponseBody is the type of the "csv" service "noop" endpoint HTTP response body for the "not-found" error.

type NoopUnauthorizedResponseBody

type NoopUnauthorizedResponseBody 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"`
}

NoopUnauthorizedResponseBody is the type of the "csv" service "noop" endpoint HTTP response body for the "unauthorized" error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL