ar_v2

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ar_v2 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 NewCopyRegistryPackageRequest

func NewCopyRegistryPackageRequest(server string, params *CopyRegistryPackageParams) (*http.Request, error)

NewCopyRegistryPackageRequest generates requests for CopyRegistryPackage

func NewDeleteMetadataRequest

func NewDeleteMetadataRequest(server string, params *DeleteMetadataParams, body DeleteMetadataJSONRequestBody) (*http.Request, error)

NewDeleteMetadataRequest calls the generic DeleteMetadata builder with application/json body

func NewDeleteMetadataRequestWithBody

func NewDeleteMetadataRequestWithBody(server string, params *DeleteMetadataParams, contentType string, body io.Reader) (*http.Request, error)

NewDeleteMetadataRequestWithBody generates requests for DeleteMetadata with any type of body

func NewGetMetadataRequest

func NewGetMetadataRequest(server string, params *GetMetadataParams) (*http.Request, error)

NewGetMetadataRequest generates requests for GetMetadata

func NewUpdateMetadataRequest

func NewUpdateMetadataRequest(server string, params *UpdateMetadataParams, body UpdateMetadataJSONRequestBody) (*http.Request, error)

NewUpdateMetadataRequest calls the generic UpdateMetadata builder with application/json body

func NewUpdateMetadataRequestWithBody

func NewUpdateMetadataRequestWithBody(server string, params *UpdateMetadataParams, contentType string, body io.Reader) (*http.Request, error)

NewUpdateMetadataRequestWithBody generates requests for UpdateMetadata with any type of body

Types

type AccountIdentifier

type AccountIdentifier = string

AccountIdentifier defines model for AccountIdentifier.

type ArtifactType

type ArtifactType = string

ArtifactType defines model for ArtifactType.

type BadRequest

type BadRequest = Error

BadRequest Standard error response with code, message and optional details

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

func (c *Client) CopyRegistryPackage(ctx context.Context, params *CopyRegistryPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteMetadata

func (c *Client) DeleteMetadata(ctx context.Context, params *DeleteMetadataParams, body DeleteMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteMetadataWithBody

func (c *Client) DeleteMetadataWithBody(ctx context.Context, params *DeleteMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetMetadata

func (c *Client) GetMetadata(ctx context.Context, params *GetMetadataParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateMetadata

func (c *Client) UpdateMetadata(ctx context.Context, params *UpdateMetadataParams, body UpdateMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateMetadataWithBody

func (c *Client) UpdateMetadataWithBody(ctx context.Context, params *UpdateMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// CopyRegistryPackage request
	CopyRegistryPackage(ctx context.Context, params *CopyRegistryPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteMetadataWithBody request with any body
	DeleteMetadataWithBody(ctx context.Context, params *DeleteMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeleteMetadata(ctx context.Context, params *DeleteMetadataParams, body DeleteMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMetadata request
	GetMetadata(ctx context.Context, params *GetMetadataParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateMetadataWithBody request with any body
	UpdateMetadataWithBody(ctx context.Context, params *UpdateMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateMetadata(ctx context.Context, params *UpdateMetadataParams, body UpdateMetadataJSONRequestBody, 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) CopyRegistryPackageWithResponse

func (c *ClientWithResponses) CopyRegistryPackageWithResponse(ctx context.Context, params *CopyRegistryPackageParams, reqEditors ...RequestEditorFn) (*CopyRegistryPackageResp, error)

CopyRegistryPackageWithResponse request returning *CopyRegistryPackageResp

func (*ClientWithResponses) DeleteMetadataWithBodyWithResponse

func (c *ClientWithResponses) DeleteMetadataWithBodyWithResponse(ctx context.Context, params *DeleteMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMetadataResp, error)

DeleteMetadataWithBodyWithResponse request with arbitrary body returning *DeleteMetadataResp

func (*ClientWithResponses) DeleteMetadataWithResponse

func (c *ClientWithResponses) DeleteMetadataWithResponse(ctx context.Context, params *DeleteMetadataParams, body DeleteMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMetadataResp, error)

func (*ClientWithResponses) GetMetadataWithResponse

func (c *ClientWithResponses) GetMetadataWithResponse(ctx context.Context, params *GetMetadataParams, reqEditors ...RequestEditorFn) (*GetMetadataResp, error)

GetMetadataWithResponse request returning *GetMetadataResp

func (*ClientWithResponses) UpdateMetadataWithBodyWithResponse

func (c *ClientWithResponses) UpdateMetadataWithBodyWithResponse(ctx context.Context, params *UpdateMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMetadataResp, error)

UpdateMetadataWithBodyWithResponse request with arbitrary body returning *UpdateMetadataResp

func (*ClientWithResponses) UpdateMetadataWithResponse

func (c *ClientWithResponses) UpdateMetadataWithResponse(ctx context.Context, params *UpdateMetadataParams, body UpdateMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMetadataResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// CopyRegistryPackageWithResponse request
	CopyRegistryPackageWithResponse(ctx context.Context, params *CopyRegistryPackageParams, reqEditors ...RequestEditorFn) (*CopyRegistryPackageResp, error)

	// DeleteMetadataWithBodyWithResponse request with any body
	DeleteMetadataWithBodyWithResponse(ctx context.Context, params *DeleteMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMetadataResp, error)

	DeleteMetadataWithResponse(ctx context.Context, params *DeleteMetadataParams, body DeleteMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMetadataResp, error)

	// GetMetadataWithResponse request
	GetMetadataWithResponse(ctx context.Context, params *GetMetadataParams, reqEditors ...RequestEditorFn) (*GetMetadataResp, error)

	// UpdateMetadataWithBodyWithResponse request with any body
	UpdateMetadataWithBodyWithResponse(ctx context.Context, params *UpdateMetadataParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMetadataResp, error)

	UpdateMetadataWithResponse(ctx context.Context, params *UpdateMetadataParams, body UpdateMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMetadataResp, error)
}

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

type CopyRegistryPackageParams

type CopyRegistryPackageParams struct {
	// AccountIdentifier Unique identifier for the Harness account.
	AccountIdentifier AccountIdentifier `form:"account_identifier" json:"account_identifier"`

	// SrcRegistryIdentifier Source registry from where to copy
	SrcRegistryIdentifier SrcRegistryIdentifier `form:"src_registry_identifier" json:"src_registry_identifier"`

	// TargetRegistryIdentifier target registry where package will be copied
	TargetRegistryIdentifier TargetRegistryIdentifier `form:"target_registry_identifier" json:"target_registry_identifier"`

	// SrcArtifact artifact name to be copied
	SrcArtifact SrcArtifact `form:"src_artifact" json:"src_artifact"`

	// SrcVersion version to be copied
	SrcVersion SrcVersion `form:"src_version" json:"src_version"`

	// ArtifactType Name of the artifact type e.g model and datasets used for hugging face
	ArtifactType *ArtifactType `form:"artifact_type,omitempty" json:"artifact_type,omitempty"`
}

CopyRegistryPackageParams defines parameters for CopyRegistryPackage.

type CopyRegistryPackageResp

type CopyRegistryPackageResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Success
	JSON400      *BadRequest
	JSON401      *Unauthenticated
	JSON403      *Unauthorized
	JSON404      *NotFound
	JSON500      *InternalServerError
}

func ParseCopyRegistryPackageResp

func ParseCopyRegistryPackageResp(rsp *http.Response) (*CopyRegistryPackageResp, error)

ParseCopyRegistryPackageResp parses an HTTP response from a CopyRegistryPackageWithResponse call

func (CopyRegistryPackageResp) Status

func (r CopyRegistryPackageResp) Status() string

Status returns HTTPResponse.Status

func (CopyRegistryPackageResp) StatusCode

func (r CopyRegistryPackageResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteMetadataJSONRequestBody

type DeleteMetadataJSONRequestBody = MetadataInput

DeleteMetadataJSONRequestBody defines body for DeleteMetadata for application/json ContentType.

type DeleteMetadataParams

type DeleteMetadataParams struct {
	// AccountIdentifier Unique identifier for the Harness account.
	AccountIdentifier AccountIdentifier `form:"account_identifier" json:"account_identifier"`
}

DeleteMetadataParams defines parameters for DeleteMetadata.

type DeleteMetadataResp

type DeleteMetadataResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Success
	JSON400      *BadRequest
	JSON401      *Unauthenticated
	JSON403      *Unauthorized
	JSON404      *NotFound
	JSON500      *InternalServerError
}

func ParseDeleteMetadataResp

func ParseDeleteMetadataResp(rsp *http.Response) (*DeleteMetadataResp, error)

ParseDeleteMetadataResp parses an HTTP response from a DeleteMetadataWithResponse call

func (DeleteMetadataResp) Status

func (r DeleteMetadataResp) Status() string

Status returns HTTPResponse.Status

func (DeleteMetadataResp) StatusCode

func (r DeleteMetadataResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Code The HTTP error code
	Code string `json:"code"`

	// Details Additional context and details about the error.
	Details *map[string]interface{} `json:"details,omitempty"`

	// Message Human-readable error message explaining what went wrong
	Message string `json:"message"`
}

Error Standard error response with code, message and optional details

type GetMetadataParams

type GetMetadataParams struct {
	// AccountIdentifier Unique identifier for the Harness account.
	AccountIdentifier AccountIdentifier `form:"account_identifier" json:"account_identifier"`

	// RegistryIdentifier Unique identifier for the artifact registry.
	RegistryIdentifier RegistryIdentifier `form:"registry_identifier" json:"registry_identifier"`

	// Package Name of the package
	Package *PackageParam `form:"package,omitempty" json:"package,omitempty"`

	// Version Name of the package version
	Version *VersionParam `form:"version,omitempty" json:"version,omitempty"`
}

GetMetadataParams defines parameters for GetMetadata.

type GetMetadataResp

type GetMetadataResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MetadataResponse
	JSON400      *BadRequest
	JSON401      *Unauthenticated
	JSON403      *Unauthorized
	JSON404      *NotFound
	JSON500      *InternalServerError
}

func ParseGetMetadataResp

func ParseGetMetadataResp(rsp *http.Response) (*GetMetadataResp, error)

ParseGetMetadataResp parses an HTTP response from a GetMetadataWithResponse call

func (GetMetadataResp) Status

func (r GetMetadataResp) Status() string

Status returns HTTPResponse.Status

func (GetMetadataResp) StatusCode

func (r GetMetadataResp) 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 InternalServerError

type InternalServerError = Error

InternalServerError Standard error response with code, message and optional details

type MetadataInput

type MetadataInput struct {
	// Metadata Array of metadata key-value pairs
	Metadata []MetadataItemInput `json:"metadata"`

	// Package Optional package name.
	Package *string `json:"package,omitempty"`

	// RegistryIdentifier The unique identifier of the registry where the metadata will be applied.
	RegistryIdentifier string `json:"registryIdentifier"`

	// Version Optional version identifier.
	Version *string `json:"version,omitempty"`
}

MetadataInput Request payload containing metadata items to add or update for a specific entity.

type MetadataItemInput

type MetadataItemInput struct {
	// Key The metadata key name (case-sensitive)
	Key string `json:"key"`

	// Value The metadata value
	Value string `json:"value"`
}

MetadataItemInput Metadata key-value pair for create/update operations

type MetadataItemOutput

type MetadataItemOutput struct {
	// Id Unique identifier for this metadata entry
	Id string `json:"id"`

	// Key The metadata key name
	Key string `json:"key"`

	// Type Indicates if metadata was manually added (MANUAL) or system-generated (AUTO)
	Type MetadataType `json:"type"`

	// Value The metadata value
	Value string `json:"value"`
}

MetadataItemOutput Metadata entry

type MetadataOutput

type MetadataOutput struct {
	// Metadata Array of metadata entries
	Metadata []MetadataItemOutput `json:"metadata"`
}

MetadataOutput Response containing all metadata entries for an entity

type MetadataRequest

type MetadataRequest = MetadataInput

MetadataRequest Request payload containing metadata items to add or update for a specific entity.

type MetadataResponse

type MetadataResponse struct {
	// Data Response containing all metadata entries for an entity
	Data MetadataOutput `json:"data"`

	// Status Request processing status indicator
	Status Status `json:"status"`
}

MetadataResponse defines model for MetadataResponse.

type MetadataType

type MetadataType string

MetadataType Indicates if metadata was manually added (MANUAL) or system-generated (AUTO)

const (
	AUTO   MetadataType = "AUTO"
	MANUAL MetadataType = "MANUAL"
)

Defines values for MetadataType.

type NotFound

type NotFound = Error

NotFound Standard error response with code, message and optional details

type PackageParam

type PackageParam = string

PackageParam defines model for PackageParam.

type RegistryIdentifier

type RegistryIdentifier = string

RegistryIdentifier defines model for RegistryIdentifier.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SrcArtifact

type SrcArtifact = string

SrcArtifact defines model for SrcArtifact.

type SrcRegistryIdentifier

type SrcRegistryIdentifier = string

SrcRegistryIdentifier defines model for SrcRegistryIdentifier.

type SrcVersion

type SrcVersion = string

SrcVersion defines model for SrcVersion.

type Status

type Status string

Status Request processing status indicator

const (
	ERROR   Status = "ERROR"
	FAILURE Status = "FAILURE"
	SUCCESS Status = "SUCCESS"
)

Defines values for Status.

type Success

type Success struct {
	// Status Request processing status indicator
	Status Status `json:"status"`
}

Success defines model for Success.

type TargetRegistryIdentifier

type TargetRegistryIdentifier = string

TargetRegistryIdentifier defines model for TargetRegistryIdentifier.

type Unauthenticated

type Unauthenticated = Error

Unauthenticated Standard error response with code, message and optional details

type Unauthorized

type Unauthorized = Error

Unauthorized Standard error response with code, message and optional details

type UpdateMetadataJSONRequestBody

type UpdateMetadataJSONRequestBody = MetadataInput

UpdateMetadataJSONRequestBody defines body for UpdateMetadata for application/json ContentType.

type UpdateMetadataParams

type UpdateMetadataParams struct {
	// AccountIdentifier Unique identifier for the Harness account.
	AccountIdentifier AccountIdentifier `form:"account_identifier" json:"account_identifier"`
}

UpdateMetadataParams defines parameters for UpdateMetadata.

type UpdateMetadataResp

type UpdateMetadataResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MetadataResponse
	JSON400      *BadRequest
	JSON401      *Unauthenticated
	JSON403      *Unauthorized
	JSON404      *NotFound
	JSON500      *InternalServerError
}

func ParseUpdateMetadataResp

func ParseUpdateMetadataResp(rsp *http.Response) (*UpdateMetadataResp, error)

ParseUpdateMetadataResp parses an HTTP response from a UpdateMetadataWithResponse call

func (UpdateMetadataResp) Status

func (r UpdateMetadataResp) Status() string

Status returns HTTPResponse.Status

func (UpdateMetadataResp) StatusCode

func (r UpdateMetadataResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type VersionParam

type VersionParam = string

VersionParam defines model for VersionParam.

Jump to

Keyboard shortcuts

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