client

package
v0.0.0-...-1b94ccc Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableToolsPath

func AvailableToolsPath() string

AvailableToolsPath returns the URL path to the tools service available HTTP endpoint.

func BuildInstallPayload

func BuildInstallPayload(toolsInstallBody string) (*tools.ToolPayload, error)

BuildInstallPayload builds the payload for the tools install endpoint from CLI flags.

func BuildRemovePayload

func BuildRemovePayload(toolsRemoveBody string, toolsRemovePackager string, toolsRemoveName string, toolsRemoveVersion string) (*tools.ToolPayload, error)

BuildRemovePayload builds the payload for the tools remove endpoint from CLI flags.

func DecodeAvailableResponse

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

DecodeAvailableResponse returns a decoder for responses returned by the tools available endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeInstallResponse

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

DecodeInstallResponse returns a decoder for responses returned by the tools install endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeInstalledResponse

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

DecodeInstalledResponse returns a decoder for responses returned by the tools installed endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeInstalledheadResponse

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

DecodeInstalledheadResponse returns a decoder for responses returned by the tools installedhead endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeRemoveResponse

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

DecodeRemoveResponse returns a decoder for responses returned by the tools remove endpoint. restoreBody controls whether the response body should be restored after having been read.

func EncodeInstallRequest

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

EncodeInstallRequest returns an encoder for requests sent to the tools install server.

func EncodeRemoveRequest

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

EncodeRemoveRequest returns an encoder for requests sent to the tools remove server.

func InstallToolsPath

func InstallToolsPath() string

InstallToolsPath returns the URL path to the tools service install HTTP endpoint.

func InstalledToolsPath

func InstalledToolsPath() string

InstalledToolsPath returns the URL path to the tools service installed HTTP endpoint.

func InstalledheadToolsPath

func InstalledheadToolsPath() string

InstalledheadToolsPath returns the URL path to the tools service installedhead HTTP endpoint.

func NewAvailableToolCollectionOK

func NewAvailableToolCollectionOK(body AvailableResponseBody) toolsviews.ToolCollectionView

NewAvailableToolCollectionOK builds a "tools" service "available" endpoint result from a HTTP "OK" response.

func NewInstallOperationOK

func NewInstallOperationOK(body *InstallResponseBody) *toolsviews.OperationView

NewInstallOperationOK builds a "tools" service "install" endpoint result from a HTTP "OK" response.

func NewInstalledToolCollectionOK

func NewInstalledToolCollectionOK(body InstalledResponseBody) toolsviews.ToolCollectionView

NewInstalledToolCollectionOK builds a "tools" service "installed" endpoint result from a HTTP "OK" response.

func NewRemoveOperationOK

func NewRemoveOperationOK(body *RemoveResponseBody) *toolsviews.OperationView

NewRemoveOperationOK builds a "tools" service "remove" endpoint result from a HTTP "OK" response.

func RemoveToolsPath

func RemoveToolsPath(packager string, name string, version string) string

RemoveToolsPath returns the URL path to the tools service remove HTTP endpoint.

func ValidateToolResponse

func ValidateToolResponse(body *ToolResponse) (err error)

ValidateToolResponse runs the validations defined on ToolResponse

Types

type AvailableResponseBody

type AvailableResponseBody []*ToolResponse

AvailableResponseBody is the type of the "tools" service "available" endpoint HTTP response body.

type Client

type Client struct {
	// Available Doer is the HTTP client used to make requests to the available
	// endpoint.
	AvailableDoer goahttp.Doer

	// Installedhead Doer is the HTTP client used to make requests to the
	// installedhead endpoint.
	InstalledheadDoer goahttp.Doer

	// Installed Doer is the HTTP client used to make requests to the installed
	// endpoint.
	InstalledDoer goahttp.Doer

	// Install Doer is the HTTP client used to make requests to the install
	// endpoint.
	InstallDoer goahttp.Doer

	// Remove Doer is the HTTP client used to make requests to the remove endpoint.
	RemoveDoer 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 tools 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 tools service servers.

func (*Client) Available

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

Available returns an endpoint that makes HTTP requests to the tools service available server.

func (*Client) BuildAvailableRequest

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

BuildAvailableRequest instantiates a HTTP request object with method and path set to call the "tools" service "available" endpoint

func (*Client) BuildInstallRequest

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

BuildInstallRequest instantiates a HTTP request object with method and path set to call the "tools" service "install" endpoint

func (*Client) BuildInstalledRequest

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

BuildInstalledRequest instantiates a HTTP request object with method and path set to call the "tools" service "installed" endpoint

func (*Client) BuildInstalledheadRequest

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

BuildInstalledheadRequest instantiates a HTTP request object with method and path set to call the "tools" service "installedhead" endpoint

func (*Client) BuildRemoveRequest

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

BuildRemoveRequest instantiates a HTTP request object with method and path set to call the "tools" service "remove" endpoint

func (*Client) Install

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

Install returns an endpoint that makes HTTP requests to the tools service install server.

func (*Client) Installed

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

Installed returns an endpoint that makes HTTP requests to the tools service installed server.

func (*Client) Installedhead

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

Installedhead returns an endpoint that makes HTTP requests to the tools service installedhead server.

func (*Client) Remove

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

Remove returns an endpoint that makes HTTP requests to the tools service remove server.

type InstallRequestBody

type InstallRequestBody struct {
	// The name of the tool
	Name string `form:"name" json:"name" xml:"name"`
	// The version of the tool
	Version string `form:"version" json:"version" xml:"version"`
	// The packager of the tool
	Packager string `form:"packager" json:"packager" xml:"packager"`
	// The url where the package can be found. Optional.
	// If present checksum must also be present.
	URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
	// A checksum of the archive. Mandatory when url is present.
	// This ensures that the package is downloaded correcly.
	Checksum *string `form:"checksum,omitempty" json:"checksum,omitempty" xml:"checksum,omitempty"`
	// The signature used to sign the url. Mandatory when url is present.
	// This ensure the security of the file downloaded
	Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"`
}

InstallRequestBody is the type of the "tools" service "install" endpoint HTTP request body.

func NewInstallRequestBody

func NewInstallRequestBody(p *tools.ToolPayload) *InstallRequestBody

NewInstallRequestBody builds the HTTP request body from the payload of the "install" endpoint of the "tools" service.

type InstallResponseBody

type InstallResponseBody struct {
	// The status of the operation
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

InstallResponseBody is the type of the "tools" service "install" endpoint HTTP response body.

type InstalledResponseBody

type InstalledResponseBody []*ToolResponse

InstalledResponseBody is the type of the "tools" service "installed" endpoint HTTP response body.

type RemoveRequestBody

type RemoveRequestBody struct {
	// The url where the package can be found. Optional.
	// If present checksum must also be present.
	URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
	// A checksum of the archive. Mandatory when url is present.
	// This ensures that the package is downloaded correcly.
	Checksum *string `form:"checksum,omitempty" json:"checksum,omitempty" xml:"checksum,omitempty"`
	// The signature used to sign the url. Mandatory when url is present.
	// This ensure the security of the file downloaded
	Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"`
}

RemoveRequestBody is the type of the "tools" service "remove" endpoint HTTP request body.

func NewRemoveRequestBody

func NewRemoveRequestBody(p *tools.ToolPayload) *RemoveRequestBody

NewRemoveRequestBody builds the HTTP request body from the payload of the "remove" endpoint of the "tools" service.

type RemoveResponseBody

type RemoveResponseBody struct {
	// The status of the operation
	Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"`
}

RemoveResponseBody is the type of the "tools" service "remove" endpoint HTTP response body.

type ToolResponse

type ToolResponse struct {
	// The name of the tool
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// The version of the tool
	Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"`
	// The packager of the tool
	Packager *string `form:"packager,omitempty" json:"packager,omitempty" xml:"packager,omitempty"`
}

ToolResponse 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