client

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCatalogErrorPayload

func BuildCatalogErrorPayload(catalogCatalogErrorCatalogName string, catalogCatalogErrorToken string) (*catalog.CatalogErrorPayload, error)

BuildCatalogErrorPayload builds the payload for the catalog CatalogError endpoint from CLI flags.

func BuildRefreshAllPayload

func BuildRefreshAllPayload(catalogRefreshAllToken string) (*catalog.RefreshAllPayload, error)

BuildRefreshAllPayload builds the payload for the catalog RefreshAll endpoint from CLI flags.

func BuildRefreshPayload

func BuildRefreshPayload(catalogRefreshCatalogName string, catalogRefreshToken string) (*catalog.RefreshPayload, error)

BuildRefreshPayload builds the payload for the catalog Refresh endpoint from CLI flags.

func CatalogErrorCatalogPath

func CatalogErrorCatalogPath(catalogName string) string

CatalogErrorCatalogPath returns the URL path to the catalog service CatalogError HTTP endpoint.

func DecodeCatalogErrorResponse

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

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

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

func DecodeRefreshAllResponse

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

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

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

func DecodeRefreshResponse

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

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

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

func EncodeCatalogErrorRequest

func EncodeCatalogErrorRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeCatalogErrorRequest returns an encoder for requests sent to the catalog CatalogError server.

func EncodeRefreshAllRequest

func EncodeRefreshAllRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeRefreshAllRequest returns an encoder for requests sent to the catalog RefreshAll server.

func EncodeRefreshRequest

func EncodeRefreshRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeRefreshRequest returns an encoder for requests sent to the catalog Refresh server.

func NewCatalogErrorInternalError

func NewCatalogErrorInternalError(body *CatalogErrorInternalErrorResponseBody) *goa.ServiceError

NewCatalogErrorInternalError builds a catalog service CatalogError endpoint internal-error error.

func NewCatalogErrorResultOK

func NewCatalogErrorResultOK(body *CatalogErrorResponseBody) *catalog.CatalogErrorResult

NewCatalogErrorResultOK builds a "catalog" service "CatalogError" endpoint result from a HTTP "OK" response.

func NewRefreshAllInternalError

func NewRefreshAllInternalError(body *RefreshAllInternalErrorResponseBody) *goa.ServiceError

NewRefreshAllInternalError builds a catalog service RefreshAll endpoint internal-error error.

func NewRefreshAllJobOK

func NewRefreshAllJobOK(body []*JobResponse) []*catalog.Job

NewRefreshAllJobOK builds a "catalog" service "RefreshAll" endpoint result from a HTTP "OK" response.

func NewRefreshInternalError

func NewRefreshInternalError(body *RefreshInternalErrorResponseBody) *goa.ServiceError

NewRefreshInternalError builds a catalog service Refresh endpoint internal-error error.

func NewRefreshJobOK

func NewRefreshJobOK(body *RefreshResponseBody) *catalogviews.JobView

NewRefreshJobOK builds a "catalog" service "Refresh" endpoint result from a HTTP "OK" response.

func NewRefreshNotFound

func NewRefreshNotFound(body *RefreshNotFoundResponseBody) *goa.ServiceError

NewRefreshNotFound builds a catalog service Refresh endpoint not-found error.

func RefreshAllCatalogPath

func RefreshAllCatalogPath() string

RefreshAllCatalogPath returns the URL path to the catalog service RefreshAll HTTP endpoint.

func RefreshCatalogPath

func RefreshCatalogPath(catalogName string) string

RefreshCatalogPath returns the URL path to the catalog service Refresh HTTP endpoint.

func ValidateCatalogErrorInternalErrorResponseBody

func ValidateCatalogErrorInternalErrorResponseBody(body *CatalogErrorInternalErrorResponseBody) (err error)

ValidateCatalogErrorInternalErrorResponseBody runs the validations defined on CatalogError_internal-error_Response_Body

func ValidateCatalogErrorResponseBody

func ValidateCatalogErrorResponseBody(body *CatalogErrorResponseBody) (err error)

ValidateCatalogErrorResponseBody runs the validations defined on CatalogErrorResponseBody

func ValidateCatalogErrorsResponseBody

func ValidateCatalogErrorsResponseBody(body *CatalogErrorsResponseBody) (err error)

ValidateCatalogErrorsResponseBody runs the validations defined on CatalogErrorsResponseBody

func ValidateJobResponse

func ValidateJobResponse(body *JobResponse) (err error)

ValidateJobResponse runs the validations defined on JobResponse

func ValidateRefreshAllInternalErrorResponseBody

func ValidateRefreshAllInternalErrorResponseBody(body *RefreshAllInternalErrorResponseBody) (err error)

ValidateRefreshAllInternalErrorResponseBody runs the validations defined on RefreshAll_internal-error_Response_Body

func ValidateRefreshInternalErrorResponseBody

func ValidateRefreshInternalErrorResponseBody(body *RefreshInternalErrorResponseBody) (err error)

ValidateRefreshInternalErrorResponseBody runs the validations defined on Refresh_internal-error_Response_Body

func ValidateRefreshNotFoundResponseBody

func ValidateRefreshNotFoundResponseBody(body *RefreshNotFoundResponseBody) (err error)

ValidateRefreshNotFoundResponseBody runs the validations defined on Refresh_not-found_Response_Body

Types

type CatalogErrorInternalErrorResponseBody

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

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

type CatalogErrorResponseBody

type CatalogErrorResponseBody struct {
	// Catalog errors
	Data []*CatalogErrorsResponseBody `form:"data,omitempty" json:"data,omitempty" xml:"data,omitempty"`
}

CatalogErrorResponseBody is the type of the "catalog" service "CatalogError" endpoint HTTP response body.

type CatalogErrorsResponseBody

type CatalogErrorsResponseBody struct {
	// Catalog Errror type
	Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"`
	// Catalog Error message
	Errors []string `form:"errors,omitempty" json:"errors,omitempty" xml:"errors,omitempty"`
}

CatalogErrorsResponseBody is used to define fields on response body types.

type Client

type Client struct {
	// Refresh Doer is the HTTP client used to make requests to the Refresh
	// endpoint.
	RefreshDoer goahttp.Doer

	// RefreshAll Doer is the HTTP client used to make requests to the RefreshAll
	// endpoint.
	RefreshAllDoer goahttp.Doer

	// CatalogError Doer is the HTTP client used to make requests to the
	// CatalogError endpoint.
	CatalogErrorDoer 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) BuildCatalogErrorRequest

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

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

func (*Client) BuildRefreshAllRequest

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

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

func (*Client) BuildRefreshRequest

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

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

func (*Client) CatalogError

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

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

func (*Client) Refresh

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

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

func (*Client) RefreshAll

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

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

type JobResponse

type JobResponse struct {
	// id of the job
	ID *uint `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the catalog
	CatalogName *string `form:"catalogName,omitempty" json:"catalogName,omitempty" xml:"catalogName,omitempty"`
	// status of the job
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

JobResponse is used to define fields on response body types.

type RefreshAllInternalErrorResponseBody

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

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

type RefreshAllResponseBody

type RefreshAllResponseBody []*JobResponse

RefreshAllResponseBody is the type of the "catalog" service "RefreshAll" endpoint HTTP response body.

type RefreshInternalErrorResponseBody

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

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

type RefreshNotFoundResponseBody

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

RefreshNotFoundResponseBody is the type of the "catalog" service "Refresh" endpoint HTTP response body for the "not-found" error.

type RefreshResponseBody

type RefreshResponseBody struct {
	// id of the job
	ID *uint `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the catalog
	CatalogName *string `form:"catalogName,omitempty" json:"catalogName,omitempty" xml:"catalogName,omitempty"`
	// status of the job
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

RefreshResponseBody is the type of the "catalog" service "Refresh" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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