ar_pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ar_pkg provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteGenericFileFromPathRequest

func NewDeleteGenericFileFromPathRequest(server string, accountId string, registry string, pPackage string, version string, filepath string) (*http.Request, error)

NewDeleteGenericFileFromPathRequest generates requests for DeleteGenericFileFromPath

func NewDownloadGenericFileFromPathRequest

func NewDownloadGenericFileFromPathRequest(server string, accountId string, registry string, pPackage string, version string, filepath string) (*http.Request, error)

NewDownloadGenericFileFromPathRequest generates requests for DownloadGenericFileFromPath

func NewDownloadGenericPackageRequest

func NewDownloadGenericPackageRequest(server string, accountId string, registry string, pPackage string, version string, params *DownloadGenericPackageParams) (*http.Request, error)

NewDownloadGenericPackageRequest generates requests for DownloadGenericPackage

func NewHeadGenericFileAtPathRequest

func NewHeadGenericFileAtPathRequest(server string, accountId string, registry string, pPackage string, version string, filepath string) (*http.Request, error)

NewHeadGenericFileAtPathRequest generates requests for HeadGenericFileAtPath

func NewUploadCondaPackageRequestWithBody

func NewUploadCondaPackageRequestWithBody(server string, accountId string, registry string, contentType string, body io.Reader) (*http.Request, error)

NewUploadCondaPackageRequestWithBody generates requests for UploadCondaPackage with any type of body

func NewUploadGenericFileToPathRequestWithBody

func NewUploadGenericFileToPathRequestWithBody(server string, accountId string, registry string, pPackage string, version string, filepath string, contentType string, body io.Reader) (*http.Request, error)

NewUploadGenericFileToPathRequestWithBody generates requests for UploadGenericFileToPath with any type of body

func NewUploadGenericPackageRequestWithBody

func NewUploadGenericPackageRequestWithBody(server string, accountId string, registry string, pPackage string, version string, contentType string, body io.Reader) (*http.Request, error)

NewUploadGenericPackageRequestWithBody generates requests for UploadGenericPackage with any type of body

func NewUploadGoPackageRequestWithBody

func NewUploadGoPackageRequestWithBody(server string, accountId string, registry string, contentType string, body io.Reader) (*http.Request, error)

NewUploadGoPackageRequestWithBody generates requests for UploadGoPackage with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteGenericFileFromPath

func (c *Client) DeleteGenericFileFromPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DownloadGenericFileFromPath

func (c *Client) DownloadGenericFileFromPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DownloadGenericPackage

func (c *Client) DownloadGenericPackage(ctx context.Context, accountId string, registry string, pPackage string, version string, params *DownloadGenericPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) HeadGenericFileAtPath

func (c *Client) HeadGenericFileAtPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadCondaPackageWithBody

func (c *Client) UploadCondaPackageWithBody(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadGenericFileToPathWithBody

func (c *Client) UploadGenericFileToPathWithBody(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadGenericPackageWithBody

func (c *Client) UploadGenericPackageWithBody(ctx context.Context, accountId string, registry string, pPackage string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadGoPackageWithBody

func (c *Client) UploadGoPackageWithBody(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// UploadCondaPackageWithBody request with any body
	UploadCondaPackageWithBody(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteGenericFileFromPath request
	DeleteGenericFileFromPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DownloadGenericFileFromPath request
	DownloadGenericFileFromPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// HeadGenericFileAtPath request
	HeadGenericFileAtPath(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UploadGenericFileToPathWithBody request with any body
	UploadGenericFileToPathWithBody(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DownloadGenericPackage request
	DownloadGenericPackage(ctx context.Context, accountId string, registry string, pPackage string, version string, params *DownloadGenericPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UploadGenericPackageWithBody request with any body
	UploadGenericPackageWithBody(ctx context.Context, accountId string, registry string, pPackage string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UploadGoPackageWithBody request with any body
	UploadGoPackageWithBody(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) DeleteGenericFileFromPathWithResponse

func (c *ClientWithResponses) DeleteGenericFileFromPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*DeleteGenericFileFromPathResp, error)

DeleteGenericFileFromPathWithResponse request returning *DeleteGenericFileFromPathResp

func (*ClientWithResponses) DownloadGenericFileFromPathWithResponse

func (c *ClientWithResponses) DownloadGenericFileFromPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*DownloadGenericFileFromPathResp, error)

DownloadGenericFileFromPathWithResponse request returning *DownloadGenericFileFromPathResp

func (*ClientWithResponses) DownloadGenericPackageWithResponse

func (c *ClientWithResponses) DownloadGenericPackageWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, params *DownloadGenericPackageParams, reqEditors ...RequestEditorFn) (*DownloadGenericPackageResp, error)

DownloadGenericPackageWithResponse request returning *DownloadGenericPackageResp

func (*ClientWithResponses) HeadGenericFileAtPathWithResponse

func (c *ClientWithResponses) HeadGenericFileAtPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*HeadGenericFileAtPathResp, error)

HeadGenericFileAtPathWithResponse request returning *HeadGenericFileAtPathResp

func (*ClientWithResponses) UploadCondaPackageWithBodyWithResponse

func (c *ClientWithResponses) UploadCondaPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadCondaPackageResp, error)

UploadCondaPackageWithBodyWithResponse request with arbitrary body returning *UploadCondaPackageResp

func (*ClientWithResponses) UploadGenericFileToPathWithBodyWithResponse

func (c *ClientWithResponses) UploadGenericFileToPathWithBodyWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGenericFileToPathResp, error)

UploadGenericFileToPathWithBodyWithResponse request with arbitrary body returning *UploadGenericFileToPathResp

func (*ClientWithResponses) UploadGenericPackageWithBodyWithResponse

func (c *ClientWithResponses) UploadGenericPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGenericPackageResp, error)

UploadGenericPackageWithBodyWithResponse request with arbitrary body returning *UploadGenericPackageResp

func (*ClientWithResponses) UploadGoPackageWithBodyWithResponse

func (c *ClientWithResponses) UploadGoPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGoPackageResp, error)

UploadGoPackageWithBodyWithResponse request with arbitrary body returning *UploadGoPackageResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// UploadCondaPackageWithBodyWithResponse request with any body
	UploadCondaPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadCondaPackageResp, error)

	// DeleteGenericFileFromPathWithResponse request
	DeleteGenericFileFromPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*DeleteGenericFileFromPathResp, error)

	// DownloadGenericFileFromPathWithResponse request
	DownloadGenericFileFromPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*DownloadGenericFileFromPathResp, error)

	// HeadGenericFileAtPathWithResponse request
	HeadGenericFileAtPathWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, reqEditors ...RequestEditorFn) (*HeadGenericFileAtPathResp, error)

	// UploadGenericFileToPathWithBodyWithResponse request with any body
	UploadGenericFileToPathWithBodyWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, filepath string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGenericFileToPathResp, error)

	// DownloadGenericPackageWithResponse request
	DownloadGenericPackageWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, params *DownloadGenericPackageParams, reqEditors ...RequestEditorFn) (*DownloadGenericPackageResp, error)

	// UploadGenericPackageWithBodyWithResponse request with any body
	UploadGenericPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, pPackage string, version string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGenericPackageResp, error)

	// UploadGoPackageWithBodyWithResponse request with any body
	UploadGoPackageWithBodyWithResponse(ctx context.Context, accountId string, registry string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadGoPackageResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DeleteGenericFileFromPathResp

type DeleteGenericFileFromPathResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteGenericFileFromPathResp

func ParseDeleteGenericFileFromPathResp(rsp *http.Response) (*DeleteGenericFileFromPathResp, error)

ParseDeleteGenericFileFromPathResp parses an HTTP response from a DeleteGenericFileFromPathWithResponse call

func (DeleteGenericFileFromPathResp) Status

Status returns HTTPResponse.Status

func (DeleteGenericFileFromPathResp) StatusCode

func (r DeleteGenericFileFromPathResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DownloadGenericFileFromPathResp

type DownloadGenericFileFromPathResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDownloadGenericFileFromPathResp

func ParseDownloadGenericFileFromPathResp(rsp *http.Response) (*DownloadGenericFileFromPathResp, error)

ParseDownloadGenericFileFromPathResp parses an HTTP response from a DownloadGenericFileFromPathWithResponse call

func (DownloadGenericFileFromPathResp) Status

Status returns HTTPResponse.Status

func (DownloadGenericFileFromPathResp) StatusCode

func (r DownloadGenericFileFromPathResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DownloadGenericPackageParams

type DownloadGenericPackageParams struct {
	Filename string `form:"filename" json:"filename"`
}

DownloadGenericPackageParams defines parameters for DownloadGenericPackage.

type DownloadGenericPackageResp

type DownloadGenericPackageResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDownloadGenericPackageResp

func ParseDownloadGenericPackageResp(rsp *http.Response) (*DownloadGenericPackageResp, error)

ParseDownloadGenericPackageResp parses an HTTP response from a DownloadGenericPackageWithResponse call

func (DownloadGenericPackageResp) Status

Status returns HTTPResponse.Status

func (DownloadGenericPackageResp) StatusCode

func (r DownloadGenericPackageResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HeadGenericFileAtPathResp

type HeadGenericFileAtPathResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseHeadGenericFileAtPathResp

func ParseHeadGenericFileAtPathResp(rsp *http.Response) (*HeadGenericFileAtPathResp, error)

ParseHeadGenericFileAtPathResp parses an HTTP response from a HeadGenericFileAtPathWithResponse call

func (HeadGenericFileAtPathResp) Status

func (r HeadGenericFileAtPathResp) Status() string

Status returns HTTPResponse.Status

func (HeadGenericFileAtPathResp) StatusCode

func (r HeadGenericFileAtPathResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type UploadCondaPackageResp

type UploadCondaPackageResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUploadCondaPackageResp

func ParseUploadCondaPackageResp(rsp *http.Response) (*UploadCondaPackageResp, error)

ParseUploadCondaPackageResp parses an HTTP response from a UploadCondaPackageWithResponse call

func (UploadCondaPackageResp) Status

func (r UploadCondaPackageResp) Status() string

Status returns HTTPResponse.Status

func (UploadCondaPackageResp) StatusCode

func (r UploadCondaPackageResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UploadGenericFileToPathResp

type UploadGenericFileToPathResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUploadGenericFileToPathResp

func ParseUploadGenericFileToPathResp(rsp *http.Response) (*UploadGenericFileToPathResp, error)

ParseUploadGenericFileToPathResp parses an HTTP response from a UploadGenericFileToPathWithResponse call

func (UploadGenericFileToPathResp) Status

Status returns HTTPResponse.Status

func (UploadGenericFileToPathResp) StatusCode

func (r UploadGenericFileToPathResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UploadGenericPackageMultipartBody

type UploadGenericPackageMultipartBody struct {
	// Description Human-readable description of the package/version
	Description *string `json:"description,omitempty"`

	// File Package file to upload
	File openapi_types.File `json:"file"`

	// Filename Original filename (mirrors form field `filename`)
	Filename string `json:"filename"`
}

UploadGenericPackageMultipartBody defines parameters for UploadGenericPackage.

type UploadGenericPackageMultipartRequestBody

type UploadGenericPackageMultipartRequestBody UploadGenericPackageMultipartBody

UploadGenericPackageMultipartRequestBody defines body for UploadGenericPackage for multipart/form-data ContentType.

type UploadGenericPackageResp

type UploadGenericPackageResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUploadGenericPackageResp

func ParseUploadGenericPackageResp(rsp *http.Response) (*UploadGenericPackageResp, error)

ParseUploadGenericPackageResp parses an HTTP response from a UploadGenericPackageWithResponse call

func (UploadGenericPackageResp) Status

func (r UploadGenericPackageResp) Status() string

Status returns HTTPResponse.Status

func (UploadGenericPackageResp) StatusCode

func (r UploadGenericPackageResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UploadGoPackageMultipartBody

type UploadGoPackageMultipartBody struct {
	// Info Package .info file to upload
	Info openapi_types.File `json:"info"`

	// Mod Package .mod file to upload
	Mod openapi_types.File `json:"mod"`

	// Zip Package .zip file to upload
	Zip openapi_types.File `json:"zip"`
}

UploadGoPackageMultipartBody defines parameters for UploadGoPackage.

type UploadGoPackageMultipartRequestBody

type UploadGoPackageMultipartRequestBody UploadGoPackageMultipartBody

UploadGoPackageMultipartRequestBody defines body for UploadGoPackage for multipart/form-data ContentType.

type UploadGoPackageResp

type UploadGoPackageResp struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUploadGoPackageResp

func ParseUploadGoPackageResp(rsp *http.Response) (*UploadGoPackageResp, error)

ParseUploadGoPackageResp parses an HTTP response from a UploadGoPackageWithResponse call

func (UploadGoPackageResp) Status

func (r UploadGoPackageResp) Status() string

Status returns HTTPResponse.Status

func (UploadGoPackageResp) StatusCode

func (r UploadGoPackageResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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