templates

package
v2.29.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 12 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 templates API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) TemplateFile

func (a *Client) TemplateFile(params *TemplateFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TemplateFileOK, error)
TemplateFile gets a template s file

Get a template's file

**Access policy**: authenticated

func (*Client) TemplateList

func (a *Client) TemplateList(params *TemplateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TemplateListOK, error)
TemplateList lists available templates

List available templates.

**Access policy**: authenticated

type ClientOption

type ClientOption func(*runtime.ClientOperation)

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

type ClientService

type ClientService interface {
	TemplateFile(params *TemplateFileParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TemplateFileOK, error)

	TemplateList(params *TemplateListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TemplateListOK, 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 templates API client.

func NewClientWithBasicAuth

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

New creates a new templates 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 templates 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 TemplateFileBadRequest

type TemplateFileBadRequest struct {
}

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

Invalid request

func NewTemplateFileBadRequest

func NewTemplateFileBadRequest() *TemplateFileBadRequest

NewTemplateFileBadRequest creates a TemplateFileBadRequest with default headers values

func (*TemplateFileBadRequest) Code

func (o *TemplateFileBadRequest) Code() int

Code gets the status code for the template file bad request response

func (*TemplateFileBadRequest) Error

func (o *TemplateFileBadRequest) Error() string

func (*TemplateFileBadRequest) IsClientError

func (o *TemplateFileBadRequest) IsClientError() bool

IsClientError returns true when this template file bad request response has a 4xx status code

func (*TemplateFileBadRequest) IsCode

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

IsCode returns true when this template file bad request response a status code equal to that given

func (*TemplateFileBadRequest) IsRedirect

func (o *TemplateFileBadRequest) IsRedirect() bool

IsRedirect returns true when this template file bad request response has a 3xx status code

func (*TemplateFileBadRequest) IsServerError

func (o *TemplateFileBadRequest) IsServerError() bool

IsServerError returns true when this template file bad request response has a 5xx status code

func (*TemplateFileBadRequest) IsSuccess

func (o *TemplateFileBadRequest) IsSuccess() bool

IsSuccess returns true when this template file bad request response has a 2xx status code

func (*TemplateFileBadRequest) String

func (o *TemplateFileBadRequest) String() string

type TemplateFileInternalServerError

type TemplateFileInternalServerError struct {
}

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

Server error

func NewTemplateFileInternalServerError

func NewTemplateFileInternalServerError() *TemplateFileInternalServerError

NewTemplateFileInternalServerError creates a TemplateFileInternalServerError with default headers values

func (*TemplateFileInternalServerError) Code

Code gets the status code for the template file internal server error response

func (*TemplateFileInternalServerError) Error

func (*TemplateFileInternalServerError) IsClientError

func (o *TemplateFileInternalServerError) IsClientError() bool

IsClientError returns true when this template file internal server error response has a 4xx status code

func (*TemplateFileInternalServerError) IsCode

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

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

func (*TemplateFileInternalServerError) IsRedirect

func (o *TemplateFileInternalServerError) IsRedirect() bool

IsRedirect returns true when this template file internal server error response has a 3xx status code

func (*TemplateFileInternalServerError) IsServerError

func (o *TemplateFileInternalServerError) IsServerError() bool

IsServerError returns true when this template file internal server error response has a 5xx status code

func (*TemplateFileInternalServerError) IsSuccess

func (o *TemplateFileInternalServerError) IsSuccess() bool

IsSuccess returns true when this template file internal server error response has a 2xx status code

func (*TemplateFileInternalServerError) String

type TemplateFileOK

type TemplateFileOK struct {
	Payload *models.TemplatesFileResponse
}

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

Success

func NewTemplateFileOK

func NewTemplateFileOK() *TemplateFileOK

NewTemplateFileOK creates a TemplateFileOK with default headers values

func (*TemplateFileOK) Code

func (o *TemplateFileOK) Code() int

Code gets the status code for the template file o k response

func (*TemplateFileOK) Error

func (o *TemplateFileOK) Error() string

func (*TemplateFileOK) GetPayload

func (o *TemplateFileOK) GetPayload() *models.TemplatesFileResponse

func (*TemplateFileOK) IsClientError

func (o *TemplateFileOK) IsClientError() bool

IsClientError returns true when this template file o k response has a 4xx status code

func (*TemplateFileOK) IsCode

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

IsCode returns true when this template file o k response a status code equal to that given

func (*TemplateFileOK) IsRedirect

func (o *TemplateFileOK) IsRedirect() bool

IsRedirect returns true when this template file o k response has a 3xx status code

func (*TemplateFileOK) IsServerError

func (o *TemplateFileOK) IsServerError() bool

IsServerError returns true when this template file o k response has a 5xx status code

func (*TemplateFileOK) IsSuccess

func (o *TemplateFileOK) IsSuccess() bool

IsSuccess returns true when this template file o k response has a 2xx status code

func (*TemplateFileOK) String

func (o *TemplateFileOK) String() string

type TemplateFileParams

type TemplateFileParams struct {

	/* ID.

	   Template identifier
	*/
	ID int64

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

TemplateFileParams contains all the parameters to send to the API endpoint

for the template file operation.

Typically these are written to a http.Request.

func NewTemplateFileParams

func NewTemplateFileParams() *TemplateFileParams

NewTemplateFileParams creates a new TemplateFileParams 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 NewTemplateFileParamsWithContext

func NewTemplateFileParamsWithContext(ctx context.Context) *TemplateFileParams

NewTemplateFileParamsWithContext creates a new TemplateFileParams object with the ability to set a context for a request.

func NewTemplateFileParamsWithHTTPClient

func NewTemplateFileParamsWithHTTPClient(client *http.Client) *TemplateFileParams

NewTemplateFileParamsWithHTTPClient creates a new TemplateFileParams object with the ability to set a custom HTTPClient for a request.

func NewTemplateFileParamsWithTimeout

func NewTemplateFileParamsWithTimeout(timeout time.Duration) *TemplateFileParams

NewTemplateFileParamsWithTimeout creates a new TemplateFileParams object with the ability to set a timeout on a request.

func (*TemplateFileParams) SetContext

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

SetContext adds the context to the template file params

func (*TemplateFileParams) SetDefaults

func (o *TemplateFileParams) SetDefaults()

SetDefaults hydrates default values in the template file params (not the query body).

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

func (*TemplateFileParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the template file params

func (*TemplateFileParams) SetID

func (o *TemplateFileParams) SetID(id int64)

SetID adds the id to the template file params

func (*TemplateFileParams) SetTimeout

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

SetTimeout adds the timeout to the template file params

func (*TemplateFileParams) WithContext

WithContext adds the context to the template file params

func (*TemplateFileParams) WithDefaults

func (o *TemplateFileParams) WithDefaults() *TemplateFileParams

WithDefaults hydrates default values in the template file params (not the query body).

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

func (*TemplateFileParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the template file params

func (*TemplateFileParams) WithID

WithID adds the id to the template file params

func (*TemplateFileParams) WithTimeout

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

WithTimeout adds the timeout to the template file params

func (*TemplateFileParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type TemplateFileReader

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

TemplateFileReader is a Reader for the TemplateFile structure.

func (*TemplateFileReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type TemplateListInternalServerError

type TemplateListInternalServerError struct {
}

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

Server error

func NewTemplateListInternalServerError

func NewTemplateListInternalServerError() *TemplateListInternalServerError

NewTemplateListInternalServerError creates a TemplateListInternalServerError with default headers values

func (*TemplateListInternalServerError) Code

Code gets the status code for the template list internal server error response

func (*TemplateListInternalServerError) Error

func (*TemplateListInternalServerError) IsClientError

func (o *TemplateListInternalServerError) IsClientError() bool

IsClientError returns true when this template list internal server error response has a 4xx status code

func (*TemplateListInternalServerError) IsCode

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

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

func (*TemplateListInternalServerError) IsRedirect

func (o *TemplateListInternalServerError) IsRedirect() bool

IsRedirect returns true when this template list internal server error response has a 3xx status code

func (*TemplateListInternalServerError) IsServerError

func (o *TemplateListInternalServerError) IsServerError() bool

IsServerError returns true when this template list internal server error response has a 5xx status code

func (*TemplateListInternalServerError) IsSuccess

func (o *TemplateListInternalServerError) IsSuccess() bool

IsSuccess returns true when this template list internal server error response has a 2xx status code

func (*TemplateListInternalServerError) String

type TemplateListOK

type TemplateListOK struct {
	Payload *models.TemplatesListResponse
}

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

Success

func NewTemplateListOK

func NewTemplateListOK() *TemplateListOK

NewTemplateListOK creates a TemplateListOK with default headers values

func (*TemplateListOK) Code

func (o *TemplateListOK) Code() int

Code gets the status code for the template list o k response

func (*TemplateListOK) Error

func (o *TemplateListOK) Error() string

func (*TemplateListOK) GetPayload

func (o *TemplateListOK) GetPayload() *models.TemplatesListResponse

func (*TemplateListOK) IsClientError

func (o *TemplateListOK) IsClientError() bool

IsClientError returns true when this template list o k response has a 4xx status code

func (*TemplateListOK) IsCode

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

IsCode returns true when this template list o k response a status code equal to that given

func (*TemplateListOK) IsRedirect

func (o *TemplateListOK) IsRedirect() bool

IsRedirect returns true when this template list o k response has a 3xx status code

func (*TemplateListOK) IsServerError

func (o *TemplateListOK) IsServerError() bool

IsServerError returns true when this template list o k response has a 5xx status code

func (*TemplateListOK) IsSuccess

func (o *TemplateListOK) IsSuccess() bool

IsSuccess returns true when this template list o k response has a 2xx status code

func (*TemplateListOK) String

func (o *TemplateListOK) String() string

type TemplateListParams

type TemplateListParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

TemplateListParams contains all the parameters to send to the API endpoint

for the template list operation.

Typically these are written to a http.Request.

func NewTemplateListParams

func NewTemplateListParams() *TemplateListParams

NewTemplateListParams creates a new TemplateListParams 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 NewTemplateListParamsWithContext

func NewTemplateListParamsWithContext(ctx context.Context) *TemplateListParams

NewTemplateListParamsWithContext creates a new TemplateListParams object with the ability to set a context for a request.

func NewTemplateListParamsWithHTTPClient

func NewTemplateListParamsWithHTTPClient(client *http.Client) *TemplateListParams

NewTemplateListParamsWithHTTPClient creates a new TemplateListParams object with the ability to set a custom HTTPClient for a request.

func NewTemplateListParamsWithTimeout

func NewTemplateListParamsWithTimeout(timeout time.Duration) *TemplateListParams

NewTemplateListParamsWithTimeout creates a new TemplateListParams object with the ability to set a timeout on a request.

func (*TemplateListParams) SetContext

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

SetContext adds the context to the template list params

func (*TemplateListParams) SetDefaults

func (o *TemplateListParams) SetDefaults()

SetDefaults hydrates default values in the template list params (not the query body).

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

func (*TemplateListParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the template list params

func (*TemplateListParams) SetTimeout

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

SetTimeout adds the timeout to the template list params

func (*TemplateListParams) WithContext

WithContext adds the context to the template list params

func (*TemplateListParams) WithDefaults

func (o *TemplateListParams) WithDefaults() *TemplateListParams

WithDefaults hydrates default values in the template list params (not the query body).

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

func (*TemplateListParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the template list params

func (*TemplateListParams) WithTimeout

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

WithTimeout adds the timeout to the template list params

func (*TemplateListParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type TemplateListReader

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

TemplateListReader is a Reader for the TemplateList structure.

func (*TemplateListReader) ReadResponse

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

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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