lfsapi

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLfsBatchRequestWithApplicationVndGitLfsPlusJSONBody

func NewLfsBatchRequestWithApplicationVndGitLfsPlusJSONBody(server string, body LfsBatchApplicationVndGitLfsPlusJSONRequestBody) (*http.Request, error)

NewLfsBatchRequestWithApplicationVndGitLfsPlusJSONBody calls the generic LfsBatch builder with application/vnd.git-lfs+json body

func NewLfsBatchRequestWithBody

func NewLfsBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLfsBatchRequestWithBody generates requests for LfsBatch with any type of body

func NewLfsStageMetadataRequest

func NewLfsStageMetadataRequest(server string, body LfsStageMetadataJSONRequestBody) (*http.Request, error)

NewLfsStageMetadataRequest calls the generic LfsStageMetadata builder with application/json body

func NewLfsStageMetadataRequestWithApplicationVndGitLfsPlusJSONBody

func NewLfsStageMetadataRequestWithApplicationVndGitLfsPlusJSONBody(server string, body LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody) (*http.Request, error)

NewLfsStageMetadataRequestWithApplicationVndGitLfsPlusJSONBody calls the generic LfsStageMetadata builder with application/vnd.git-lfs+json body

func NewLfsStageMetadataRequestWithBody

func NewLfsStageMetadataRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLfsStageMetadataRequestWithBody generates requests for LfsStageMetadata with any type of body

func NewLfsUploadProxyRequestWithBody

func NewLfsUploadProxyRequestWithBody(server string, oid string, contentType string, body io.Reader) (*http.Request, error)

NewLfsUploadProxyRequestWithBody generates requests for LfsUploadProxy with any type of body

func NewLfsVerifyRequestWithApplicationVndGitLfsPlusJSONBody

func NewLfsVerifyRequestWithApplicationVndGitLfsPlusJSONBody(server string, body LfsVerifyApplicationVndGitLfsPlusJSONRequestBody) (*http.Request, error)

NewLfsVerifyRequestWithApplicationVndGitLfsPlusJSONBody calls the generic LfsVerify builder with application/vnd.git-lfs+json body

func NewLfsVerifyRequestWithBody

func NewLfsVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLfsVerifyRequestWithBody generates requests for LfsVerify with any type of body

Types

type AccessMethod

type AccessMethod struct {
	AccessId       *string                     `json:"access_id,omitempty"`
	AccessUrl      *AccessMethodAccessUrl      `json:"access_url,omitempty"`
	Authorizations *AccessMethodAuthorizations `json:"authorizations,omitempty"`
	Region         *string                     `json:"region,omitempty"`
	Type           *string                     `json:"type,omitempty"`
}

AccessMethod defines model for AccessMethod.

type AccessMethodAccessUrl

type AccessMethodAccessUrl struct {
	Url *string `json:"url,omitempty"`
}

AccessMethodAccessUrl defines model for AccessMethodAccessUrl.

type AccessMethodAuthorizations

type AccessMethodAuthorizations struct {
	BearerAuthIssuers *[]string `json:"bearer_auth_issuers,omitempty"`
}

AccessMethodAuthorizations defines model for AccessMethodAuthorizations.

type Action

type Action struct {
	// ExpiresAt RFC3339 timestamp
	ExpiresAt *time.Time         `json:"expires_at,omitempty"`
	ExpiresIn *int32             `json:"expires_in,omitempty"`
	Header    *map[string]string `json:"header,omitempty"`
	Href      string             `json:"href"`
}

Action defines model for Action.

type BatchActions

type BatchActions struct {
	Download *Action `json:"download,omitempty"`
	Upload   *Action `json:"upload,omitempty"`
	Verify   *Action `json:"verify,omitempty"`
}

BatchActions defines model for BatchActions.

type BatchRequest

type BatchRequest struct {
	HashAlgo  *string               `json:"hash_algo,omitempty"`
	Objects   []BatchRequestObject  `json:"objects"`
	Operation BatchRequestOperation `json:"operation"`
	Ref       *RefSpec              `json:"ref,omitempty"`
	Transfers *[]string             `json:"transfers,omitempty"`
}

BatchRequest defines model for BatchRequest.

type BatchRequestObject

type BatchRequestObject struct {
	Oid  string `json:"oid"`
	Size int64  `json:"size"`
}

BatchRequestObject defines model for BatchRequestObject.

type BatchRequestOperation

type BatchRequestOperation string

BatchRequestOperation defines model for BatchRequest.Operation.

const (
	Download BatchRequestOperation = "download"
	Upload   BatchRequestOperation = "upload"
)

Defines values for BatchRequestOperation.

type BatchResponse

type BatchResponse struct {
	HashAlgo *string               `json:"hash_algo,omitempty"`
	Objects  []BatchResponseObject `json:"objects"`
	Transfer *string               `json:"transfer,omitempty"`
}

BatchResponse defines model for BatchResponse.

type BatchResponseObject

type BatchResponseObject struct {
	Actions       *BatchActions `json:"actions,omitempty"`
	Authenticated *bool         `json:"authenticated,omitempty"`
	Error         *ObjectError  `json:"error,omitempty"`
	Oid           string        `json:"oid"`
	Size          int64         `json:"size"`
}

BatchResponseObject defines model for BatchResponseObject.

type Checksum

type Checksum struct {
	Checksum string `json:"checksum"`
	Type     string `json:"type"`
}

Checksum defines model for Checksum.

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

func (c *Client) LfsBatchWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsBatchApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LfsBatchWithBody

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

func (*Client) LfsStageMetadata

func (c *Client) LfsStageMetadata(ctx context.Context, body LfsStageMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LfsStageMetadataWithApplicationVndGitLfsPlusJSONBody

func (c *Client) LfsStageMetadataWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LfsStageMetadataWithBody

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

func (*Client) LfsUploadProxyWithBody

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

func (*Client) LfsVerifyWithApplicationVndGitLfsPlusJSONBody

func (c *Client) LfsVerifyWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsVerifyApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LfsVerifyWithBody

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

type ClientInterface

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

	LfsBatchWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsBatchApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	LfsStageMetadata(ctx context.Context, body LfsStageMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	LfsStageMetadataWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	LfsVerifyWithApplicationVndGitLfsPlusJSONBody(ctx context.Context, body LfsVerifyApplicationVndGitLfsPlusJSONRequestBody, 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) LfsBatchWithApplicationVndGitLfsPlusJSONBodyWithResponse

func (c *ClientWithResponses) LfsBatchWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsBatchApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsBatchResponse, error)

func (*ClientWithResponses) LfsBatchWithBodyWithResponse

func (c *ClientWithResponses) LfsBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsBatchResponse, error)

LfsBatchWithBodyWithResponse request with arbitrary body returning *LfsBatchResponse

func (*ClientWithResponses) LfsStageMetadataWithApplicationVndGitLfsPlusJSONBodyWithResponse

func (c *ClientWithResponses) LfsStageMetadataWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

func (*ClientWithResponses) LfsStageMetadataWithBodyWithResponse

func (c *ClientWithResponses) LfsStageMetadataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

LfsStageMetadataWithBodyWithResponse request with arbitrary body returning *LfsStageMetadataResponse

func (*ClientWithResponses) LfsStageMetadataWithResponse

func (c *ClientWithResponses) LfsStageMetadataWithResponse(ctx context.Context, body LfsStageMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

func (*ClientWithResponses) LfsUploadProxyWithBodyWithResponse

func (c *ClientWithResponses) LfsUploadProxyWithBodyWithResponse(ctx context.Context, oid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsUploadProxyResponse, error)

LfsUploadProxyWithBodyWithResponse request with arbitrary body returning *LfsUploadProxyResponse

func (*ClientWithResponses) LfsVerifyWithApplicationVndGitLfsPlusJSONBodyWithResponse

func (c *ClientWithResponses) LfsVerifyWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsVerifyApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsVerifyResponse, error)

func (*ClientWithResponses) LfsVerifyWithBodyWithResponse

func (c *ClientWithResponses) LfsVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsVerifyResponse, error)

LfsVerifyWithBodyWithResponse request with arbitrary body returning *LfsVerifyResponse

type ClientWithResponsesInterface

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

	LfsBatchWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsBatchApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsBatchResponse, error)

	// LfsStageMetadataWithBodyWithResponse request with any body
	LfsStageMetadataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

	LfsStageMetadataWithResponse(ctx context.Context, body LfsStageMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

	LfsStageMetadataWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsStageMetadataResponse, error)

	// LfsUploadProxyWithBodyWithResponse request with any body
	LfsUploadProxyWithBodyWithResponse(ctx context.Context, oid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsUploadProxyResponse, error)

	// LfsVerifyWithBodyWithResponse request with any body
	LfsVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LfsVerifyResponse, error)

	LfsVerifyWithApplicationVndGitLfsPlusJSONBodyWithResponse(ctx context.Context, body LfsVerifyApplicationVndGitLfsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*LfsVerifyResponse, error)
}

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

type DrsObjectCandidate

type DrsObjectCandidate struct {
	AccessMethods *[]AccessMethod `json:"access_methods,omitempty"`
	Aliases       *[]string       `json:"aliases,omitempty"`
	Checksums     *[]Checksum     `json:"checksums,omitempty"`
	Description   *string         `json:"description,omitempty"`
	Id            *string         `json:"id,omitempty"`
	MimeType      *string         `json:"mime_type,omitempty"`
	Name          *string         `json:"name,omitempty"`
	Size          *int64          `json:"size,omitempty"`
}

DrsObjectCandidate defines model for DrsObjectCandidate.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type LFSErrorResponse

type LFSErrorResponse struct {
	DocumentationUrl *string `json:"documentation_url,omitempty"`
	Message          string  `json:"message"`
	RequestId        *string `json:"request_id,omitempty"`
}

LFSErrorResponse defines model for LFSErrorResponse.

type LfsBatchApplicationVndGitLfsPlusJSONRequestBody

type LfsBatchApplicationVndGitLfsPlusJSONRequestBody = BatchRequest

LfsBatchApplicationVndGitLfsPlusJSONRequestBody defines body for LfsBatch for application/vnd.git-lfs+json ContentType.

type LfsBatchResponse

type LfsBatchResponse struct {
	Body                        []byte
	HTTPResponse                *http.Response
	ApplicationvndGitLfsJSON200 *BatchResponse
	ApplicationvndGitLfsJSON401 *LFSErrorResponse
	ApplicationvndGitLfsJSON403 *LFSErrorResponse
	ApplicationvndGitLfsJSON404 *LFSErrorResponse
	ApplicationvndGitLfsJSON406 *LFSErrorResponse
	ApplicationvndGitLfsJSON413 *LFSErrorResponse
	ApplicationvndGitLfsJSON422 *LFSErrorResponse
	ApplicationvndGitLfsJSON429 *LFSErrorResponse
	ApplicationvndGitLfsJSON500 *LFSErrorResponse
	ApplicationvndGitLfsJSON502 *LFSErrorResponse
	ApplicationvndGitLfsJSON503 *LFSErrorResponse
	ApplicationvndGitLfsJSON504 *LFSErrorResponse
	ApplicationvndGitLfsJSON507 *LFSErrorResponse
	ApplicationvndGitLfsJSON509 *LFSErrorResponse
}

func ParseLfsBatchResponse

func ParseLfsBatchResponse(rsp *http.Response) (*LfsBatchResponse, error)

ParseLfsBatchResponse parses an HTTP response from a LfsBatchWithResponse call

func (LfsBatchResponse) Status

func (r LfsBatchResponse) Status() string

Status returns HTTPResponse.Status

func (LfsBatchResponse) StatusCode

func (r LfsBatchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody

type LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody = MetadataSubmitRequest

LfsStageMetadataApplicationVndGitLfsPlusJSONRequestBody defines body for LfsStageMetadata for application/vnd.git-lfs+json ContentType.

type LfsStageMetadataJSONRequestBody

type LfsStageMetadataJSONRequestBody = MetadataSubmitRequest

LfsStageMetadataJSONRequestBody defines body for LfsStageMetadata for application/json ContentType.

type LfsStageMetadataResponse

type LfsStageMetadataResponse struct {
	Body                        []byte
	HTTPResponse                *http.Response
	JSON200                     *MetadataSubmitResponse
	ApplicationvndGitLfsJSON200 *MetadataSubmitResponse
	JSON400                     *LFSErrorResponse
	JSON401                     *LFSErrorResponse
	JSON403                     *LFSErrorResponse
	JSON500                     *LFSErrorResponse
}

func ParseLfsStageMetadataResponse

func ParseLfsStageMetadataResponse(rsp *http.Response) (*LfsStageMetadataResponse, error)

ParseLfsStageMetadataResponse parses an HTTP response from a LfsStageMetadataWithResponse call

func (LfsStageMetadataResponse) Status

func (r LfsStageMetadataResponse) Status() string

Status returns HTTPResponse.Status

func (LfsStageMetadataResponse) StatusCode

func (r LfsStageMetadataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LfsUploadProxyResponse

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

func ParseLfsUploadProxyResponse

func ParseLfsUploadProxyResponse(rsp *http.Response) (*LfsUploadProxyResponse, error)

ParseLfsUploadProxyResponse parses an HTTP response from a LfsUploadProxyWithResponse call

func (LfsUploadProxyResponse) Status

func (r LfsUploadProxyResponse) Status() string

Status returns HTTPResponse.Status

func (LfsUploadProxyResponse) StatusCode

func (r LfsUploadProxyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LfsVerifyApplicationVndGitLfsPlusJSONRequestBody

type LfsVerifyApplicationVndGitLfsPlusJSONRequestBody = VerifyRequest

LfsVerifyApplicationVndGitLfsPlusJSONRequestBody defines body for LfsVerify for application/vnd.git-lfs+json ContentType.

type LfsVerifyResponse

type LfsVerifyResponse struct {
	Body                        []byte
	HTTPResponse                *http.Response
	ApplicationvndGitLfsJSON400 *LFSErrorResponse
	ApplicationvndGitLfsJSON401 *LFSErrorResponse
	ApplicationvndGitLfsJSON403 *LFSErrorResponse
	ApplicationvndGitLfsJSON404 *LFSErrorResponse
	ApplicationvndGitLfsJSON500 *LFSErrorResponse
}

func ParseLfsVerifyResponse

func ParseLfsVerifyResponse(rsp *http.Response) (*LfsVerifyResponse, error)

ParseLfsVerifyResponse parses an HTTP response from a LfsVerifyWithResponse call

func (LfsVerifyResponse) Status

func (r LfsVerifyResponse) Status() string

Status returns HTTPResponse.Status

func (LfsVerifyResponse) StatusCode

func (r LfsVerifyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type MetadataSubmitRequest

type MetadataSubmitRequest struct {
	Candidates []DrsObjectCandidate `json:"candidates"`
	TtlSeconds *int64               `json:"ttl_seconds,omitempty"`
}

MetadataSubmitRequest defines model for MetadataSubmitRequest.

type MetadataSubmitResponse

type MetadataSubmitResponse struct {
	Staged int32 `json:"staged"`
}

MetadataSubmitResponse defines model for MetadataSubmitResponse.

type ObjectError

type ObjectError struct {
	// Code Object-level error code (commonly HTTP-like status code)
	Code    int32  `json:"code"`
	Message string `json:"message"`
}

ObjectError defines model for ObjectError.

type RefSpec

type RefSpec struct {
	// Name Fully-qualified server refspec
	Name *string `json:"name,omitempty"`
}

RefSpec defines model for RefSpec.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type VerifyRequest

type VerifyRequest struct {
	Oid  string `json:"oid"`
	Size int64  `json:"size"`
}

VerifyRequest defines model for VerifyRequest.

Jump to

Keyboard shortcuts

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