content

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for content API

func (*Client) GenerateContent

func (a *Client) GenerateContent(params *GenerateContentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateContentOK, error)

GenerateContent 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.

type ClientService

type ClientService interface {
	GenerateContent(params *GenerateContentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GenerateContentOK, 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 content API client.

func NewClientWithBasicAuth

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

New creates a new content 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 content 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 GenerateContentBadRequest

type GenerateContentBadRequest struct {
}

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

Malformed request

func NewGenerateContentBadRequest

func NewGenerateContentBadRequest() *GenerateContentBadRequest

NewGenerateContentBadRequest creates a GenerateContentBadRequest with default headers values

func (*GenerateContentBadRequest) Code

func (o *GenerateContentBadRequest) Code() int

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

func (*GenerateContentBadRequest) Error

func (o *GenerateContentBadRequest) Error() string

func (*GenerateContentBadRequest) IsClientError

func (o *GenerateContentBadRequest) IsClientError() bool

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

func (*GenerateContentBadRequest) IsCode

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

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

func (*GenerateContentBadRequest) IsRedirect

func (o *GenerateContentBadRequest) IsRedirect() bool

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

func (*GenerateContentBadRequest) IsServerError

func (o *GenerateContentBadRequest) IsServerError() bool

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

func (*GenerateContentBadRequest) IsSuccess

func (o *GenerateContentBadRequest) IsSuccess() bool

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

func (*GenerateContentBadRequest) String

func (o *GenerateContentBadRequest) String() string

type GenerateContentInternalServerError

type GenerateContentInternalServerError struct {
	WWWAuthenticate string
}

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

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

func NewGenerateContentInternalServerError

func NewGenerateContentInternalServerError() *GenerateContentInternalServerError

NewGenerateContentInternalServerError creates a GenerateContentInternalServerError with default headers values

func (*GenerateContentInternalServerError) Code

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

func (*GenerateContentInternalServerError) Error

func (*GenerateContentInternalServerError) IsClientError

func (o *GenerateContentInternalServerError) IsClientError() bool

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

func (*GenerateContentInternalServerError) IsCode

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

func (*GenerateContentInternalServerError) IsRedirect

func (o *GenerateContentInternalServerError) IsRedirect() bool

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

func (*GenerateContentInternalServerError) IsServerError

func (o *GenerateContentInternalServerError) IsServerError() bool

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

func (*GenerateContentInternalServerError) IsSuccess

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

func (*GenerateContentInternalServerError) String

type GenerateContentOK

type GenerateContentOK struct {
	Payload string
}

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

OK

func NewGenerateContentOK

func NewGenerateContentOK() *GenerateContentOK

NewGenerateContentOK creates a GenerateContentOK with default headers values

func (*GenerateContentOK) Code

func (o *GenerateContentOK) Code() int

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

func (*GenerateContentOK) Error

func (o *GenerateContentOK) Error() string

func (*GenerateContentOK) GetPayload

func (o *GenerateContentOK) GetPayload() string

func (*GenerateContentOK) IsClientError

func (o *GenerateContentOK) IsClientError() bool

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

func (*GenerateContentOK) IsCode

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

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

func (*GenerateContentOK) IsRedirect

func (o *GenerateContentOK) IsRedirect() bool

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

func (*GenerateContentOK) IsServerError

func (o *GenerateContentOK) IsServerError() bool

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

func (*GenerateContentOK) IsSuccess

func (o *GenerateContentOK) IsSuccess() bool

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

func (*GenerateContentOK) String

func (o *GenerateContentOK) String() string

type GenerateContentParams

type GenerateContentParams 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
}

GenerateContentParams contains all the parameters to send to the API endpoint

for the generate content operation.

Typically these are written to a http.Request.

func NewGenerateContentParams

func NewGenerateContentParams() *GenerateContentParams

NewGenerateContentParams creates a new GenerateContentParams 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 NewGenerateContentParamsWithContext

func NewGenerateContentParamsWithContext(ctx context.Context) *GenerateContentParams

NewGenerateContentParamsWithContext creates a new GenerateContentParams object with the ability to set a context for a request.

func NewGenerateContentParamsWithHTTPClient

func NewGenerateContentParamsWithHTTPClient(client *http.Client) *GenerateContentParams

NewGenerateContentParamsWithHTTPClient creates a new GenerateContentParams object with the ability to set a custom HTTPClient for a request.

func NewGenerateContentParamsWithTimeout

func NewGenerateContentParamsWithTimeout(timeout time.Duration) *GenerateContentParams

NewGenerateContentParamsWithTimeout creates a new GenerateContentParams object with the ability to set a timeout on a request.

func (*GenerateContentParams) SetAttachment

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

SetAttachment adds the attachment to the generate content params

func (*GenerateContentParams) SetContext

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

SetContext adds the context to the generate content params

func (*GenerateContentParams) SetDefaults

func (o *GenerateContentParams) SetDefaults()

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

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

func (*GenerateContentParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the generate content params

func (*GenerateContentParams) SetSchema

func (o *GenerateContentParams) SetSchema(schema string)

SetSchema adds the schema to the generate content params

func (*GenerateContentParams) SetTimeout

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

SetTimeout adds the timeout to the generate content params

func (*GenerateContentParams) WithAttachment

func (o *GenerateContentParams) WithAttachment(attachment runtime.NamedReadCloser) *GenerateContentParams

WithAttachment adds the attachment to the generate content params

func (*GenerateContentParams) WithContext

WithContext adds the context to the generate content params

func (*GenerateContentParams) WithDefaults

func (o *GenerateContentParams) WithDefaults() *GenerateContentParams

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

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

func (*GenerateContentParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the generate content params

func (*GenerateContentParams) WithSchema

func (o *GenerateContentParams) WithSchema(schema string) *GenerateContentParams

WithSchema adds the schema to the generate content params

func (*GenerateContentParams) WithTimeout

func (o *GenerateContentParams) WithTimeout(timeout time.Duration) *GenerateContentParams

WithTimeout adds the timeout to the generate content params

func (*GenerateContentParams) WriteToRequest

func (o *GenerateContentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GenerateContentReader

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

GenerateContentReader is a Reader for the GenerateContent structure.

func (*GenerateContentReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GenerateContentUnauthorized

type GenerateContentUnauthorized struct {
	WWWAuthenticate string
}

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

API key is missing or invalid

func NewGenerateContentUnauthorized

func NewGenerateContentUnauthorized() *GenerateContentUnauthorized

NewGenerateContentUnauthorized creates a GenerateContentUnauthorized with default headers values

func (*GenerateContentUnauthorized) Code

func (o *GenerateContentUnauthorized) Code() int

Code gets the status code for the generate content unauthorized response

func (*GenerateContentUnauthorized) Error

func (*GenerateContentUnauthorized) IsClientError

func (o *GenerateContentUnauthorized) IsClientError() bool

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

func (*GenerateContentUnauthorized) IsCode

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

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

func (*GenerateContentUnauthorized) IsRedirect

func (o *GenerateContentUnauthorized) IsRedirect() bool

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

func (*GenerateContentUnauthorized) IsServerError

func (o *GenerateContentUnauthorized) IsServerError() bool

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

func (*GenerateContentUnauthorized) IsSuccess

func (o *GenerateContentUnauthorized) IsSuccess() bool

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

func (*GenerateContentUnauthorized) String

func (o *GenerateContentUnauthorized) String() string

Jump to

Keyboard shortcuts

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