client

package
v0.0.0-...-d2cf98a Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMetaResponse

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

DecodeMetaResponse returns a decoder for responses returned by the modules meta endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeMetaResponse 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 MetaModulesPath

func MetaModulesPath() string

MetaModulesPath returns the URL path to the modules service meta HTTP endpoint.

func NewMetaBadRequest

func NewMetaBadRequest(body *MetaBadRequestResponseBody) *goa.ServiceError

NewMetaBadRequest builds a modules service meta endpoint bad-request error.

func NewMetaForbidden

func NewMetaForbidden(body *MetaForbiddenResponseBody) *goa.ServiceError

NewMetaForbidden builds a modules service meta endpoint forbidden error.

func NewMetaNotFound

func NewMetaNotFound(body *MetaNotFoundResponseBody) *goa.ServiceError

NewMetaNotFound builds a modules service meta endpoint not-found error.

func NewMetaResultOK

func NewMetaResultOK(body interface{}) *modules.MetaResult

NewMetaResultOK builds a "modules" service "meta" endpoint result from a HTTP "OK" response.

func NewMetaUnauthorized

func NewMetaUnauthorized(body *MetaUnauthorizedResponseBody) *goa.ServiceError

NewMetaUnauthorized builds a modules service meta endpoint unauthorized error.

func ValidateMetaBadRequestResponseBody

func ValidateMetaBadRequestResponseBody(body *MetaBadRequestResponseBody) (err error)

ValidateMetaBadRequestResponseBody runs the validations defined on meta_bad-request_response_body

func ValidateMetaForbiddenResponseBody

func ValidateMetaForbiddenResponseBody(body *MetaForbiddenResponseBody) (err error)

ValidateMetaForbiddenResponseBody runs the validations defined on meta_forbidden_response_body

func ValidateMetaNotFoundResponseBody

func ValidateMetaNotFoundResponseBody(body *MetaNotFoundResponseBody) (err error)

ValidateMetaNotFoundResponseBody runs the validations defined on meta_not-found_response_body

func ValidateMetaUnauthorizedResponseBody

func ValidateMetaUnauthorizedResponseBody(body *MetaUnauthorizedResponseBody) (err error)

ValidateMetaUnauthorizedResponseBody runs the validations defined on meta_unauthorized_response_body

Types

type Client

type Client struct {
	// Meta Doer is the HTTP client used to make requests to the meta endpoint.
	MetaDoer 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 modules 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 modules service servers.

func (*Client) BuildMetaRequest

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

BuildMetaRequest instantiates a HTTP request object with method and path set to call the "modules" service "meta" endpoint

func (*Client) Meta

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

Meta returns an endpoint that makes HTTP requests to the modules service meta server.

type MetaBadRequestResponseBody

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

MetaBadRequestResponseBody is the type of the "modules" service "meta" endpoint HTTP response body for the "bad-request" error.

type MetaForbiddenResponseBody

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

MetaForbiddenResponseBody is the type of the "modules" service "meta" endpoint HTTP response body for the "forbidden" error.

type MetaNotFoundResponseBody

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

MetaNotFoundResponseBody is the type of the "modules" service "meta" endpoint HTTP response body for the "not-found" error.

type MetaUnauthorizedResponseBody

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

MetaUnauthorizedResponseBody is the type of the "modules" service "meta" 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