client

package
v0.25.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildListPayload

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

BuildListPayload builds the payload for the pipeline list 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) (interface{}, 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 DecodeShowResponse

func DecodeShowResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, 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.NotFound): http.StatusNotFound
  • error: internal error

func EncodeListRequest

func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) 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 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.NotFound

NewShowNotFound builds a pipeline service show endpoint not_found error.

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 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

	// 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 interface{}) (*http.Request, error)

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

func (*Client) BuildShowRequest

func (c *Client) BuildShowRequest(ctx context.Context, v interface{}) (*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) 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 {
	// Name of the collection
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the collection
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,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 ShowNotFoundResponseBody

type ShowNotFoundResponseBody struct {
	// Message of error
	Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
	// Identifier of missing collection
	ID *uint `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 {
	// Name of the collection
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Name of the collection
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,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