generated

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetHealthRequest

func NewGetHealthRequest(server string) (*http.Request, error)

NewGetHealthRequest generates requests for GetHealth

func NewGetProjectArtifactRequest

func NewGetProjectArtifactRequest(server string, projectName string, artifactId string) (*http.Request, error)

NewGetProjectArtifactRequest generates requests for GetProjectArtifact

func NewGetProjectArtifactsRequest

func NewGetProjectArtifactsRequest(server string, projectName string) (*http.Request, error)

NewGetProjectArtifactsRequest generates requests for GetProjectArtifacts

func NewProjectArtifactExistsRequest

func NewProjectArtifactExistsRequest(server string, projectName string, artifactId string) (*http.Request, error)

NewProjectArtifactExistsRequest generates requests for ProjectArtifactExists

func NewUploadArtifactRequestWithBody

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

NewUploadArtifactRequestWithBody generates requests for UploadArtifact with any type of body

Types

type Artifact

type Artifact struct {
	Id string `json:"id"`

	// location to download the artifact using a GET request.
	Location *string `json:"location,omitempty"`
}

Artifact defines model for Artifact.

type ArtifactIds

type ArtifactIds []string

ArtifactIds defines model for ArtifactIds.

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

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

func (*Client) GetProjectArtifact

func (c *Client) GetProjectArtifact(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetProjectArtifacts

func (c *Client) GetProjectArtifacts(ctx context.Context, projectName string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ProjectArtifactExists

func (c *Client) ProjectArtifactExists(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadArtifactWithBody

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

type ClientInterface

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

	// GetProjectArtifact request
	GetProjectArtifact(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ProjectArtifactExists request
	ProjectArtifactExists(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetProjectArtifacts request
	GetProjectArtifacts(ctx context.Context, projectName string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UploadArtifact request  with any body
	UploadArtifactWithBody(ctx context.Context, projectName 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) GetHealthWithResponse

func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

GetHealthWithResponse request returning *GetHealthResponse

func (*ClientWithResponses) GetProjectArtifactWithResponse

func (c *ClientWithResponses) GetProjectArtifactWithResponse(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*GetProjectArtifactResponse, error)

GetProjectArtifactWithResponse request returning *GetProjectArtifactResponse

func (*ClientWithResponses) GetProjectArtifactsWithResponse

func (c *ClientWithResponses) GetProjectArtifactsWithResponse(ctx context.Context, projectName string, reqEditors ...RequestEditorFn) (*GetProjectArtifactsResponse, error)

GetProjectArtifactsWithResponse request returning *GetProjectArtifactsResponse

func (*ClientWithResponses) ProjectArtifactExistsWithResponse

func (c *ClientWithResponses) ProjectArtifactExistsWithResponse(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*ProjectArtifactExistsResponse, error)

ProjectArtifactExistsWithResponse request returning *ProjectArtifactExistsResponse

func (*ClientWithResponses) UploadArtifactWithBodyWithResponse

func (c *ClientWithResponses) UploadArtifactWithBodyWithResponse(ctx context.Context, projectName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadArtifactResponse, error)

UploadArtifactWithBodyWithResponse request with arbitrary body returning *UploadArtifactResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetHealth request
	GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

	// GetProjectArtifact request
	GetProjectArtifactWithResponse(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*GetProjectArtifactResponse, error)

	// ProjectArtifactExists request
	ProjectArtifactExistsWithResponse(ctx context.Context, projectName string, artifactId string, reqEditors ...RequestEditorFn) (*ProjectArtifactExistsResponse, error)

	// GetProjectArtifacts request
	GetProjectArtifactsWithResponse(ctx context.Context, projectName string, reqEditors ...RequestEditorFn) (*GetProjectArtifactsResponse, error)

	// UploadArtifact request  with any body
	UploadArtifactWithBodyWithResponse(ctx context.Context, projectName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadArtifactResponse, error)
}

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

type Error

type Error struct {
	Id string `json:"id"`
}

Error defines model for Error.

type GetHealthResponse

type GetHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Success
	JSONDefault  *Error
}

func ParseGetHealthResponse

func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)

ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call

func (GetHealthResponse) Status

func (r GetHealthResponse) Status() string

Status returns HTTPResponse.Status

func (GetHealthResponse) StatusCode

func (r GetHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetProjectArtifactResponse

type GetProjectArtifactResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Artifact
}

func ParseGetProjectArtifactResponse

func ParseGetProjectArtifactResponse(rsp *http.Response) (*GetProjectArtifactResponse, error)

ParseGetProjectArtifactResponse parses an HTTP response from a GetProjectArtifactWithResponse call

func (GetProjectArtifactResponse) Status

Status returns HTTPResponse.Status

func (GetProjectArtifactResponse) StatusCode

func (r GetProjectArtifactResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetProjectArtifactsResponse

type GetProjectArtifactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ArtifactIds
}

func ParseGetProjectArtifactsResponse

func ParseGetProjectArtifactsResponse(rsp *http.Response) (*GetProjectArtifactsResponse, error)

ParseGetProjectArtifactsResponse parses an HTTP response from a GetProjectArtifactsWithResponse call

func (GetProjectArtifactsResponse) Status

Status returns HTTPResponse.Status

func (GetProjectArtifactsResponse) StatusCode

func (r GetProjectArtifactsResponse) 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 ProjectArtifactExistsResponse

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

func ParseProjectArtifactExistsResponse

func ParseProjectArtifactExistsResponse(rsp *http.Response) (*ProjectArtifactExistsResponse, error)

ParseProjectArtifactExistsResponse parses an HTTP response from a ProjectArtifactExistsWithResponse call

func (ProjectArtifactExistsResponse) Status

Status returns HTTPResponse.Status

func (ProjectArtifactExistsResponse) StatusCode

func (r ProjectArtifactExistsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type Success

type Success struct {
	Message string `json:"message"`
}

Success defines model for Success.

type UploadArtifactResponse

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

func ParseUploadArtifactResponse

func ParseUploadArtifactResponse(rsp *http.Response) (*UploadArtifactResponse, error)

ParseUploadArtifactResponse parses an HTTP response from a UploadArtifactWithResponse call

func (UploadArtifactResponse) Status

func (r UploadArtifactResponse) Status() string

Status returns HTTPResponse.Status

func (UploadArtifactResponse) StatusCode

func (r UploadArtifactResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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