client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHealthPath

func CheckHealthPath() string

CheckHealthPath returns the URL path to the Health service Check HTTP endpoint.

func DecodeCheckResponse

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

DecodeCheckResponse returns a decoder for responses returned by the Health Check endpoint. restoreBody controls whether the response body should be restored after having been read.

func NewCheckResultOK

func NewCheckResultOK(body *CheckResponseBody) *health.CheckResult

NewCheckResultOK builds a "Health" service "Check" endpoint result from a HTTP "OK" response.

func ValidateCheckResponseBody

func ValidateCheckResponseBody(body *CheckResponseBody) (err error)

ValidateCheckResponseBody runs the validations defined on CheckResponseBody

Types

type CheckResponseBody

type CheckResponseBody struct {
	// Status of the API
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

CheckResponseBody is the type of the "Health" service "Check" endpoint HTTP response body.

type Client

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

func (*Client) BuildCheckRequest

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

BuildCheckRequest instantiates a HTTP request object with method and path set to call the "Health" service "Check" endpoint

func (*Client) Check

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

Check returns an endpoint that makes HTTP requests to the Health service Check server.

Jump to

Keyboard shortcuts

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