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

client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 namespaces list endpoint. restoreBody controls whether the response body should be restored after having been read.

func ListNamespacesPath

func ListNamespacesPath() string

ListNamespacesPath returns the URL path to the namespaces service list HTTP endpoint.

func NewListNamespaceOK

func NewListNamespaceOK(body []*NamespaceResponse) []*namespaces.Namespace

NewListNamespaceOK builds a "namespaces" service "list" endpoint result from a HTTP "OK" response.

func ValidateNamespaceResponse

func ValidateNamespaceResponse(body *NamespaceResponse) (err error)

ValidateNamespaceResponse runs the validations defined on NamespaceResponse

Types

type Client

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

func (*Client) List

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

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

type NamespaceResponse

type NamespaceResponse struct {
	// Namespace name
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Namespace phase
	Phase *string `form:"phase,omitempty" json:"phase,omitempty" xml:"phase,omitempty"`
	// Creation timestamp
	CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
}

NamespaceResponse is used to define fields on response body types.

Jump to

Keyboard shortcuts

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