client

package
v1.14.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeStatusResponse

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

DecodeStatusResponse returns a decoder for responses returned by the status Status endpoint. restoreBody controls whether the response body should be restored after having been read.

func NewStatusResultOK

func NewStatusResultOK(body *StatusResponseBody) *status.StatusResult

NewStatusResultOK builds a "status" service "Status" endpoint result from a HTTP "OK" response.

func StatusStatusPath

func StatusStatusPath() string

StatusStatusPath returns the URL path to the status service Status HTTP endpoint.

func StatusStatusPath2

func StatusStatusPath2() string

StatusStatusPath2 returns the URL path to the status service Status HTTP endpoint.

func ValidateHubServiceResponseBody

func ValidateHubServiceResponseBody(body *HubServiceResponseBody) (err error)

ValidateHubServiceResponseBody runs the validations defined on HubServiceResponseBody

func ValidateStatusResponseBody

func ValidateStatusResponseBody(body *StatusResponseBody) (err error)

ValidateStatusResponseBody runs the validations defined on StatusResponseBody

Types

type Client

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

func (*Client) BuildStatusRequest

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

BuildStatusRequest instantiates a HTTP request object with method and path set to call the "status" service "Status" endpoint

func (*Client) Status

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

Status returns an endpoint that makes HTTP requests to the status service Status server.

type HubServiceResponseBody

type HubServiceResponseBody struct {
	// Name of the service
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Status of the service
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
	// Details of the error if any
	Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"`
}

HubServiceResponseBody is used to define fields on response body types.

type StatusResponseBody

type StatusResponseBody struct {
	// List of services and their status
	Services []*HubServiceResponseBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"`
}

StatusResponseBody is the type of the "status" service "Status" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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