Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.46.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeListResponse

func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)

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

  • "internal-error" (type *goa.ServiceError): http.StatusInternalServerError
  • error: internal error

func ListCatalogPath

func ListCatalogPath() string

ListCatalogPath returns the URL path to the catalog service List HTTP endpoint.

func NewListInternalError

func NewListInternalError(body *ListInternalErrorResponseBody) *goa.ServiceError

NewListInternalError builds a catalog service List endpoint internal-error error.

func NewListResultOK

func NewListResultOK(body *ListResponseBody) *catalog.ListResult

NewListResultOK builds a "catalog" service "List" endpoint result from a HTTP "OK" response.

func ValidateCatalogResponseBody

func ValidateCatalogResponseBody(body *CatalogResponseBody) (err error)

ValidateCatalogResponseBody runs the validations defined on CatalogResponseBody

func ValidateListInternalErrorResponseBody

func ValidateListInternalErrorResponseBody(body *ListInternalErrorResponseBody) (err error)

ValidateListInternalErrorResponseBody runs the validations defined on List_internal-error_Response_Body

func ValidateListResponseBody

func ValidateListResponseBody(body *ListResponseBody) (err error)

ValidateListResponseBody runs the validations defined on ListResponseBody

Types

type CatalogResponseBody

type CatalogResponseBody struct {
	// ID is the unique id of the catalog
	ID *uint `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of catalog
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Type of catalog
	Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"`
	// URL of catalog
	URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
	// Provider of catalog
	Provider *string `form:"provider,omitempty" json:"provider,omitempty" xml:"provider,omitempty"`
}

CatalogResponseBody is used to define fields on response body types.

type Client

type Client struct {
	// List Doer is the HTTP client used to make requests to the List endpoint.
	ListDoer 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 catalog 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 catalog service servers.

func (*Client) BuildListRequest

func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, error)

BuildListRequest instantiates a HTTP request object with method and path set to call the "catalog" service "List" endpoint

func (*Client) List

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

List returns an endpoint that makes HTTP requests to the catalog service List server.

type ListInternalErrorResponseBody

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

ListInternalErrorResponseBody is the type of the "catalog" service "List" endpoint HTTP response body for the "internal-error" error.

type ListResponseBody

type ListResponseBody struct {
	Data []*CatalogResponseBody `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
}

ListResponseBody is the type of the "catalog" service "List" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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