client

package
v0.0.0-...-69b4764 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildQueryPublishingStatusPayload

func BuildQueryPublishingStatusPayload(fileserverQueryPublishingStatusRequestID string) (*fileserver.QueryPublishingStatusPayload, error)

BuildQueryPublishingStatusPayload builds the payload for the fileserver query-publishing-status endpoint from CLI flags.

func BuildRequestToPublishPayload

func BuildRequestToPublishPayload(fileserverRequestToPublishBody string) (*fileserver.RequestToPublishPayload, error)

BuildRequestToPublishPayload builds the payload for the fileserver request-to-publish endpoint from CLI flags.

func DecodeQueryPublishingStatusResponse

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

DecodeQueryPublishingStatusResponse returns a decoder for responses returned by the fileserver query-publishing-status endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeRequestToPublishResponse

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

DecodeRequestToPublishResponse returns a decoder for responses returned by the fileserver request-to-publish endpoint. restoreBody controls whether the response body should be restored after having been read.

func EncodeRequestToPublishRequest

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

EncodeRequestToPublishRequest returns an encoder for requests sent to the fileserver request-to-publish server.

func QueryPublishingStatusFileserverPath

func QueryPublishingStatusFileserverPath(requestID string) string

QueryPublishingStatusFileserverPath returns the URL path to the fileserver service query-publishing-status HTTP endpoint.

func RequestToPublishFileserverPath

func RequestToPublishFileserverPath() string

RequestToPublishFileserverPath returns the URL path to the fileserver service request-to-publish HTTP endpoint.

Types

type Client

type Client struct {
	// RequestToPublish Doer is the HTTP client used to make requests to the
	// request-to-publish endpoint.
	RequestToPublishDoer goahttp.Doer

	// QueryPublishingStatus Doer is the HTTP client used to make requests to the
	// query-publishing-status endpoint.
	QueryPublishingStatusDoer 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 fileserver 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 fileserver service servers.

func (*Client) BuildQueryPublishingStatusRequest

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

BuildQueryPublishingStatusRequest instantiates a HTTP request object with method and path set to call the "fileserver" service "query-publishing-status" endpoint

func (*Client) BuildRequestToPublishRequest

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

BuildRequestToPublishRequest instantiates a HTTP request object with method and path set to call the "fileserver" service "request-to-publish" endpoint

func (*Client) QueryPublishingStatus

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

QueryPublishingStatus returns an endpoint that makes HTTP requests to the fileserver service query-publishing-status server.

func (*Client) RequestToPublish

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

RequestToPublish returns an endpoint that makes HTTP requests to the fileserver service request-to-publish server.

type RequestToPublishRequestBody

type RequestToPublishRequestBody struct {
	// The full url of the pushed OCI artifact, contain the tag part. It will parse
	// the repo from it.
	ArtifactURL string `form:"artifact_url" json:"artifact_url" xml:"artifact_url"`
}

RequestToPublishRequestBody is the type of the "fileserver" service "request-to-publish" endpoint HTTP request body.

func NewRequestToPublishRequestBody

func NewRequestToPublishRequestBody(p *fileserver.RequestToPublishPayload) *RequestToPublishRequestBody

NewRequestToPublishRequestBody builds the HTTP request body from the payload of the "request-to-publish" endpoint of the "fileserver" service.

Jump to

Keyboard shortcuts

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