client

package
v0.41.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildListPayload

func BuildListPayload(pipelineListName string, pipelineListStatus string) (*pipeline.ListPayload, error)

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

func BuildProcessingPayload added in v0.34.0

func BuildProcessingPayload(pipelineProcessingID string) (*pipeline.ProcessingPayload, error)

BuildProcessingPayload builds the payload for the pipeline processing endpoint from CLI flags.

func BuildShowPayload

func BuildShowPayload(pipelineShowID string) (*pipeline.ShowPayload, error)

BuildShowPayload builds the payload for the pipeline show 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 pipeline list endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeProcessingResponse added in v0.34.0

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

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

  • "not_found" (type *pipeline.PipelineNotFound): http.StatusNotFound
  • error: internal error

func DecodeShowResponse

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

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

  • "not_found" (type *pipeline.PipelineNotFound): http.StatusNotFound
  • 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 pipeline list server.

func ListPipelinePath

func ListPipelinePath() string

ListPipelinePath returns the URL path to the pipeline service list HTTP endpoint.

func NewListEnduroStoredPipelineOK

func NewListEnduroStoredPipelineOK(body []*EnduroStoredPipelineResponse) []*pipeline.EnduroStoredPipeline

NewListEnduroStoredPipelineOK builds a "pipeline" service "list" endpoint result from a HTTP "OK" response.

func NewProcessingNotFound added in v0.34.0

func NewProcessingNotFound(body *ProcessingNotFoundResponseBody) *pipeline.PipelineNotFound

NewProcessingNotFound builds a pipeline service processing endpoint not_found error.

func NewShowEnduroStoredPipelineOK

func NewShowEnduroStoredPipelineOK(body *ShowResponseBody) *pipelineviews.EnduroStoredPipelineView

NewShowEnduroStoredPipelineOK builds a "pipeline" service "show" endpoint result from a HTTP "OK" response.

func NewShowNotFound

func NewShowNotFound(body *ShowNotFoundResponseBody) *pipeline.PipelineNotFound

NewShowNotFound builds a pipeline service show endpoint not_found error.

func ProcessingPipelinePath added in v0.34.0

func ProcessingPipelinePath(id string) string

ProcessingPipelinePath returns the URL path to the pipeline service processing HTTP endpoint.

func ShowPipelinePath

func ShowPipelinePath(id string) string

ShowPipelinePath returns the URL path to the pipeline service show HTTP endpoint.

func ValidateEnduroStoredPipelineResponse

func ValidateEnduroStoredPipelineResponse(body *EnduroStoredPipelineResponse) (err error)

ValidateEnduroStoredPipelineResponse runs the validations defined on EnduroStored-PipelineResponse

func ValidateProcessingNotFoundResponseBody added in v0.34.0

func ValidateProcessingNotFoundResponseBody(body *ProcessingNotFoundResponseBody) (err error)

ValidateProcessingNotFoundResponseBody runs the validations defined on processing_not_found_response_body

func ValidateShowNotFoundResponseBody

func ValidateShowNotFoundResponseBody(body *ShowNotFoundResponseBody) (err error)

ValidateShowNotFoundResponseBody runs the validations defined on show_not_found_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

	// Show Doer is the HTTP client used to make requests to the show endpoint.
	ShowDoer goahttp.Doer

	// Processing Doer is the HTTP client used to make requests to the processing
	// endpoint.
	ProcessingDoer 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 pipeline 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 pipeline 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 "pipeline" service "list" endpoint

func (*Client) BuildProcessingRequest added in v0.34.0

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

BuildProcessingRequest instantiates a HTTP request object with method and path set to call the "pipeline" service "processing" endpoint

func (*Client) BuildShowRequest

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

BuildShowRequest instantiates a HTTP request object with method and path set to call the "pipeline" service "show" endpoint

func (*Client) List

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

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

func (*Client) Processing added in v0.34.0

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

Processing returns an endpoint that makes HTTP requests to the pipeline service processing server.

func (*Client) Show

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

Show returns an endpoint that makes HTTP requests to the pipeline service show server.

type EnduroStoredPipelineResponse

type EnduroStoredPipelineResponse struct {
	// Identifier of pipeline
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the pipeline
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Maximum concurrent transfers
	Capacity *int64 `form:"capacity,omitempty" json:"capacity,omitempty" xml:"capacity,omitempty"`
	// Current transfers
	Current *int64  `form:"current,omitempty" json:"current,omitempty" xml:"current,omitempty"`
	Status  *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

EnduroStoredPipelineResponse is used to define fields on response body types.

type ListResponseBody

type ListResponseBody []*EnduroStoredPipelineResponse

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

type ProcessingNotFoundResponseBody added in v0.34.0

type ProcessingNotFoundResponseBody struct {
	// Message of error
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Identifier of missing pipeline
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
}

ProcessingNotFoundResponseBody is the type of the "pipeline" service "processing" endpoint HTTP response body for the "not_found" error.

type ShowNotFoundResponseBody

type ShowNotFoundResponseBody struct {
	// Message of error
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Identifier of missing pipeline
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
}

ShowNotFoundResponseBody is the type of the "pipeline" service "show" endpoint HTTP response body for the "not_found" error.

type ShowResponseBody

type ShowResponseBody struct {
	// Identifier of pipeline
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the pipeline
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Maximum concurrent transfers
	Capacity *int64 `form:"capacity,omitempty" json:"capacity,omitempty" xml:"capacity,omitempty"`
	// Current transfers
	Current *int64  `form:"current,omitempty" json:"current,omitempty" xml:"current,omitempty"`
	Status  *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

ShowResponseBody is the type of the "pipeline" service "show" endpoint HTTP response body.

Jump to

Keyboard shortcuts

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