client

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildListPayload

func BuildListPayload(dashboardListLimit string, dashboardListPage string, dashboardListFilter string, dashboardListOrderBy string, dashboardListOrderDesc string, dashboardListAtTime string, dashboardListJWT string) (*dashboard.ListPayload, error)

BuildListPayload builds the payload for the dashboard list endpoint from CLI flags.

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 dashboard list endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeListResponse may return the following errors:

  • "bad-request" (type *dashboard.BadRequestT): http.StatusBadRequest
  • "invalid-parameter" (type *dashboard.InvalidParameterT): http.StatusUnprocessableEntity
  • "invalid-scopes" (type *dashboard.InvalidScopesT): http.StatusForbidden
  • "not-implemented" (type *dashboard.NotImplementedT): http.StatusNotImplemented
  • "not-available" (type *dashboard.ServiceNotAvailableT): http.StatusServiceUnavailable
  • "not-authorized" (type *dashboard.UnauthorizedT): http.StatusUnauthorized
  • error: internal error

func EncodeListRequest

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

EncodeListRequest returns an encoder for requests sent to the dashboard list server.

func ListDashboardPath

func ListDashboardPath() string

ListDashboardPath returns the URL path to the dashboard service list HTTP endpoint.

func NewListBadRequest

func NewListBadRequest(body *ListBadRequestResponseBody) *dashboard.BadRequestT

NewListBadRequest builds a dashboard service list endpoint bad-request error.

func NewListDashboardListRTOK

func NewListDashboardListRTOK(body *ListResponseBody) *dashboardviews.DashboardListRTView

NewListDashboardListRTOK builds a "dashboard" service "list" endpoint result from a HTTP "OK" response.

func NewListInvalidParameter

func NewListInvalidParameter(body *ListInvalidParameterResponseBody) *dashboard.InvalidParameterT

NewListInvalidParameter builds a dashboard service list endpoint invalid-parameter error.

func NewListInvalidScopes

func NewListInvalidScopes(body *ListInvalidScopesResponseBody) *dashboard.InvalidScopesT

NewListInvalidScopes builds a dashboard service list endpoint invalid-scopes error.

func NewListNotAuthorized

func NewListNotAuthorized() *dashboard.UnauthorizedT

NewListNotAuthorized builds a dashboard service list endpoint not-authorized error.

func NewListNotAvailable

func NewListNotAvailable() *dashboard.ServiceNotAvailableT

NewListNotAvailable builds a dashboard service list endpoint not-available error.

func NewListNotImplemented

func NewListNotImplemented(body *ListNotImplementedResponseBody) *dashboard.NotImplementedT

NewListNotImplemented builds a dashboard service list endpoint not-implemented error.

func ValidateDashboardListItemResponseBody

func ValidateDashboardListItemResponseBody(body *DashboardListItemResponseBody) (err error)

ValidateDashboardListItemResponseBody runs the validations defined on DashboardListItemResponseBody

func ValidateListBadRequestResponseBody

func ValidateListBadRequestResponseBody(body *ListBadRequestResponseBody) (err error)

ValidateListBadRequestResponseBody runs the validations defined on list_bad-request_response_body

func ValidateListInvalidParameterResponseBody

func ValidateListInvalidParameterResponseBody(body *ListInvalidParameterResponseBody) (err error)

ValidateListInvalidParameterResponseBody runs the validations defined on list_invalid-parameter_response_body

func ValidateListInvalidScopesResponseBody

func ValidateListInvalidScopesResponseBody(body *ListInvalidScopesResponseBody) (err error)

ValidateListInvalidScopesResponseBody runs the validations defined on list_invalid-scopes_response_body

func ValidateListNotImplementedResponseBody

func ValidateListNotImplementedResponseBody(body *ListNotImplementedResponseBody) (err error)

ValidateListNotImplementedResponseBody runs the validations defined on list_not-implemented_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 dashboard 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 dashboard 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 "dashboard" service "list" endpoint

func (*Client) List

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

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

type DashboardListItemResponseBody

type DashboardListItemResponseBody struct {
	// dashboard id
	ID *int `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// dashboard uid
	UID *string `form:"uid,omitempty" json:"uid,omitempty" xml:"uid,omitempty"`
	// Dashboard title
	Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
	// Dashboard url
	URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
}

DashboardListItemResponseBody is used to define fields on response body types.

type ListBadRequestResponseBody

type ListBadRequestResponseBody struct {
	// Information message
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
}

ListBadRequestResponseBody is the type of the "dashboard" service "list" endpoint HTTP response body for the "bad-request" error.

type ListInvalidParameterResponseBody

type ListInvalidParameterResponseBody struct {
	// message describing expected type or pattern.
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// name of parameter.
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// provided parameter value.
	Value *string `form:"value,omitempty" json:"value,omitempty" xml:"value,omitempty"`
}

ListInvalidParameterResponseBody is the type of the "dashboard" service "list" endpoint HTTP response body for the "invalid-parameter" error.

type ListInvalidScopesResponseBody

type ListInvalidScopesResponseBody struct {
	// ID of involved resource
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Message of error
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
}

ListInvalidScopesResponseBody is the type of the "dashboard" service "list" endpoint HTTP response body for the "invalid-scopes" error.

type ListNotImplementedResponseBody

type ListNotImplementedResponseBody struct {
	// Information message
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
}

ListNotImplementedResponseBody is the type of the "dashboard" service "list" endpoint HTTP response body for the "not-implemented" error.

type ListResponseBody

type ListResponseBody struct {
	// Dashboards
	Items []*DashboardListItemResponseBody `form:"items,omitempty" json:"items,omitempty" xml:"items,omitempty"`
}

ListResponseBody is the type of the "dashboard" service "list" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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