operations

package
v0.0.0-...-92452bf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContentTypeApplicationJSON

func WithContentTypeApplicationJSON(r *runtime.ClientOperation)

WithContentTypeApplicationJSON sets the Content-Type header to "application/json".

func WithContentTypeMultipartFormData

func WithContentTypeMultipartFormData(r *runtime.ClientOperation)

WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data".

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for operations API

func (*Client) PostContentGenerate

func (a *Client) PostContentGenerate(params *PostContentGenerateParams, opts ...ClientOption) (*PostContentGenerateOK, error)

PostContentGenerate extracts structured data from a file based on a provided JSON schema

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

func WithContentType

func WithContentType(mime string) ClientOption

WithContentType allows the client to force the Content-Type header to negotiate a specific Consumer from the server.

You may use this option to set arbitrary extensions to your MIME media type.

type ClientService

type ClientService interface {
	PostContentGenerate(params *PostContentGenerateParams, opts ...ClientOption) (*PostContentGenerateOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new operations API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new operations API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new operations API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type PostContentGenerateBadRequest

type PostContentGenerateBadRequest struct {
}

PostContentGenerateBadRequest describes a response with status code 400, with default header values.

Malformed request

func NewPostContentGenerateBadRequest

func NewPostContentGenerateBadRequest() *PostContentGenerateBadRequest

NewPostContentGenerateBadRequest creates a PostContentGenerateBadRequest with default headers values

func (*PostContentGenerateBadRequest) Code

Code gets the status code for the post content generate bad request response

func (*PostContentGenerateBadRequest) Error

func (*PostContentGenerateBadRequest) IsClientError

func (o *PostContentGenerateBadRequest) IsClientError() bool

IsClientError returns true when this post content generate bad request response has a 4xx status code

func (*PostContentGenerateBadRequest) IsCode

func (o *PostContentGenerateBadRequest) IsCode(code int) bool

IsCode returns true when this post content generate bad request response a status code equal to that given

func (*PostContentGenerateBadRequest) IsRedirect

func (o *PostContentGenerateBadRequest) IsRedirect() bool

IsRedirect returns true when this post content generate bad request response has a 3xx status code

func (*PostContentGenerateBadRequest) IsServerError

func (o *PostContentGenerateBadRequest) IsServerError() bool

IsServerError returns true when this post content generate bad request response has a 5xx status code

func (*PostContentGenerateBadRequest) IsSuccess

func (o *PostContentGenerateBadRequest) IsSuccess() bool

IsSuccess returns true when this post content generate bad request response has a 2xx status code

func (*PostContentGenerateBadRequest) String

type PostContentGenerateInternalServerError

type PostContentGenerateInternalServerError struct {
	WWWAuthenticate string
}

PostContentGenerateInternalServerError describes a response with status code 500, with default header values.

Something didin't work on our side. Not your fault!

func NewPostContentGenerateInternalServerError

func NewPostContentGenerateInternalServerError() *PostContentGenerateInternalServerError

NewPostContentGenerateInternalServerError creates a PostContentGenerateInternalServerError with default headers values

func (*PostContentGenerateInternalServerError) Code

Code gets the status code for the post content generate internal server error response

func (*PostContentGenerateInternalServerError) Error

func (*PostContentGenerateInternalServerError) IsClientError

func (o *PostContentGenerateInternalServerError) IsClientError() bool

IsClientError returns true when this post content generate internal server error response has a 4xx status code

func (*PostContentGenerateInternalServerError) IsCode

IsCode returns true when this post content generate internal server error response a status code equal to that given

func (*PostContentGenerateInternalServerError) IsRedirect

IsRedirect returns true when this post content generate internal server error response has a 3xx status code

func (*PostContentGenerateInternalServerError) IsServerError

func (o *PostContentGenerateInternalServerError) IsServerError() bool

IsServerError returns true when this post content generate internal server error response has a 5xx status code

func (*PostContentGenerateInternalServerError) IsSuccess

IsSuccess returns true when this post content generate internal server error response has a 2xx status code

func (*PostContentGenerateInternalServerError) String

type PostContentGenerateOK

type PostContentGenerateOK struct {
}

PostContentGenerateOK describes a response with status code 200, with default header values.

OK

func NewPostContentGenerateOK

func NewPostContentGenerateOK() *PostContentGenerateOK

NewPostContentGenerateOK creates a PostContentGenerateOK with default headers values

func (*PostContentGenerateOK) Code

func (o *PostContentGenerateOK) Code() int

Code gets the status code for the post content generate o k response

func (*PostContentGenerateOK) Error

func (o *PostContentGenerateOK) Error() string

func (*PostContentGenerateOK) IsClientError

func (o *PostContentGenerateOK) IsClientError() bool

IsClientError returns true when this post content generate o k response has a 4xx status code

func (*PostContentGenerateOK) IsCode

func (o *PostContentGenerateOK) IsCode(code int) bool

IsCode returns true when this post content generate o k response a status code equal to that given

func (*PostContentGenerateOK) IsRedirect

func (o *PostContentGenerateOK) IsRedirect() bool

IsRedirect returns true when this post content generate o k response has a 3xx status code

func (*PostContentGenerateOK) IsServerError

func (o *PostContentGenerateOK) IsServerError() bool

IsServerError returns true when this post content generate o k response has a 5xx status code

func (*PostContentGenerateOK) IsSuccess

func (o *PostContentGenerateOK) IsSuccess() bool

IsSuccess returns true when this post content generate o k response has a 2xx status code

func (*PostContentGenerateOK) String

func (o *PostContentGenerateOK) String() string

type PostContentGenerateParams

type PostContentGenerateParams struct {

	/* Attachment.

	   The file to parse.
	*/
	Attachment runtime.NamedReadCloser

	/* Schema.

	   The JSON schema that will be returned in the response.
	*/
	Schema string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PostContentGenerateParams contains all the parameters to send to the API endpoint

for the post content generate operation.

Typically these are written to a http.Request.

func NewPostContentGenerateParams

func NewPostContentGenerateParams() *PostContentGenerateParams

NewPostContentGenerateParams creates a new PostContentGenerateParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewPostContentGenerateParamsWithContext

func NewPostContentGenerateParamsWithContext(ctx context.Context) *PostContentGenerateParams

NewPostContentGenerateParamsWithContext creates a new PostContentGenerateParams object with the ability to set a context for a request.

func NewPostContentGenerateParamsWithHTTPClient

func NewPostContentGenerateParamsWithHTTPClient(client *http.Client) *PostContentGenerateParams

NewPostContentGenerateParamsWithHTTPClient creates a new PostContentGenerateParams object with the ability to set a custom HTTPClient for a request.

func NewPostContentGenerateParamsWithTimeout

func NewPostContentGenerateParamsWithTimeout(timeout time.Duration) *PostContentGenerateParams

NewPostContentGenerateParamsWithTimeout creates a new PostContentGenerateParams object with the ability to set a timeout on a request.

func (*PostContentGenerateParams) SetAttachment

func (o *PostContentGenerateParams) SetAttachment(attachment runtime.NamedReadCloser)

SetAttachment adds the attachment to the post content generate params

func (*PostContentGenerateParams) SetContext

func (o *PostContentGenerateParams) SetContext(ctx context.Context)

SetContext adds the context to the post content generate params

func (*PostContentGenerateParams) SetDefaults

func (o *PostContentGenerateParams) SetDefaults()

SetDefaults hydrates default values in the post content generate params (not the query body).

All values with no default are reset to their zero value.

func (*PostContentGenerateParams) SetHTTPClient

func (o *PostContentGenerateParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the post content generate params

func (*PostContentGenerateParams) SetSchema

func (o *PostContentGenerateParams) SetSchema(schema string)

SetSchema adds the schema to the post content generate params

func (*PostContentGenerateParams) SetTimeout

func (o *PostContentGenerateParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the post content generate params

func (*PostContentGenerateParams) WithAttachment

WithAttachment adds the attachment to the post content generate params

func (*PostContentGenerateParams) WithContext

WithContext adds the context to the post content generate params

func (*PostContentGenerateParams) WithDefaults

WithDefaults hydrates default values in the post content generate params (not the query body).

All values with no default are reset to their zero value.

func (*PostContentGenerateParams) WithHTTPClient

func (o *PostContentGenerateParams) WithHTTPClient(client *http.Client) *PostContentGenerateParams

WithHTTPClient adds the HTTPClient to the post content generate params

func (*PostContentGenerateParams) WithSchema

WithSchema adds the schema to the post content generate params

func (*PostContentGenerateParams) WithTimeout

WithTimeout adds the timeout to the post content generate params

func (*PostContentGenerateParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type PostContentGenerateReader

type PostContentGenerateReader struct {
	// contains filtered or unexported fields
}

PostContentGenerateReader is a Reader for the PostContentGenerate structure.

func (*PostContentGenerateReader) ReadResponse

func (o *PostContentGenerateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type PostContentGenerateUnauthorized

type PostContentGenerateUnauthorized struct {
	WWWAuthenticate string
}

PostContentGenerateUnauthorized describes a response with status code 401, with default header values.

API key is missing or invalid

func NewPostContentGenerateUnauthorized

func NewPostContentGenerateUnauthorized() *PostContentGenerateUnauthorized

NewPostContentGenerateUnauthorized creates a PostContentGenerateUnauthorized with default headers values

func (*PostContentGenerateUnauthorized) Code

Code gets the status code for the post content generate unauthorized response

func (*PostContentGenerateUnauthorized) Error

func (*PostContentGenerateUnauthorized) IsClientError

func (o *PostContentGenerateUnauthorized) IsClientError() bool

IsClientError returns true when this post content generate unauthorized response has a 4xx status code

func (*PostContentGenerateUnauthorized) IsCode

func (o *PostContentGenerateUnauthorized) IsCode(code int) bool

IsCode returns true when this post content generate unauthorized response a status code equal to that given

func (*PostContentGenerateUnauthorized) IsRedirect

func (o *PostContentGenerateUnauthorized) IsRedirect() bool

IsRedirect returns true when this post content generate unauthorized response has a 3xx status code

func (*PostContentGenerateUnauthorized) IsServerError

func (o *PostContentGenerateUnauthorized) IsServerError() bool

IsServerError returns true when this post content generate unauthorized response has a 5xx status code

func (*PostContentGenerateUnauthorized) IsSuccess

func (o *PostContentGenerateUnauthorized) IsSuccess() bool

IsSuccess returns true when this post content generate unauthorized response has a 2xx status code

func (*PostContentGenerateUnauthorized) String

Jump to

Keyboard shortcuts

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