preferences

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: AGPL-3.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 preferences API

func (*Client) PreferencesGet

func (a *Client) PreferencesGet(params *PreferencesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PreferencesGetOK, error)
PreferencesGet returns an object of user preferences

Example:

```

{ "posting:default:visibility": "public", "posting:default:sensitive": false, "posting:default:language": "en", "reading:expand:media": "default", "reading:expand:spoilers": false, "reading:autoplay:gifs": false }

````

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 {
	PreferencesGet(params *PreferencesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PreferencesGetOK, 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 preferences API client.

func NewClientWithBasicAuth

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

New creates a new preferences 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 preferences 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 PreferencesGetBadRequest

type PreferencesGetBadRequest struct {
}

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

bad request

func NewPreferencesGetBadRequest

func NewPreferencesGetBadRequest() *PreferencesGetBadRequest

NewPreferencesGetBadRequest creates a PreferencesGetBadRequest with default headers values

func (*PreferencesGetBadRequest) Code

func (o *PreferencesGetBadRequest) Code() int

Code gets the status code for the preferences get bad request response

func (*PreferencesGetBadRequest) Error

func (o *PreferencesGetBadRequest) Error() string

func (*PreferencesGetBadRequest) IsClientError

func (o *PreferencesGetBadRequest) IsClientError() bool

IsClientError returns true when this preferences get bad request response has a 4xx status code

func (*PreferencesGetBadRequest) IsCode

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

IsCode returns true when this preferences get bad request response a status code equal to that given

func (*PreferencesGetBadRequest) IsRedirect

func (o *PreferencesGetBadRequest) IsRedirect() bool

IsRedirect returns true when this preferences get bad request response has a 3xx status code

func (*PreferencesGetBadRequest) IsServerError

func (o *PreferencesGetBadRequest) IsServerError() bool

IsServerError returns true when this preferences get bad request response has a 5xx status code

func (*PreferencesGetBadRequest) IsSuccess

func (o *PreferencesGetBadRequest) IsSuccess() bool

IsSuccess returns true when this preferences get bad request response has a 2xx status code

func (*PreferencesGetBadRequest) String

func (o *PreferencesGetBadRequest) String() string

type PreferencesGetInternalServerError

type PreferencesGetInternalServerError struct {
}

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

internal server error

func NewPreferencesGetInternalServerError

func NewPreferencesGetInternalServerError() *PreferencesGetInternalServerError

NewPreferencesGetInternalServerError creates a PreferencesGetInternalServerError with default headers values

func (*PreferencesGetInternalServerError) Code

Code gets the status code for the preferences get internal server error response

func (*PreferencesGetInternalServerError) Error

func (*PreferencesGetInternalServerError) IsClientError

func (o *PreferencesGetInternalServerError) IsClientError() bool

IsClientError returns true when this preferences get internal server error response has a 4xx status code

func (*PreferencesGetInternalServerError) IsCode

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

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

func (*PreferencesGetInternalServerError) IsRedirect

func (o *PreferencesGetInternalServerError) IsRedirect() bool

IsRedirect returns true when this preferences get internal server error response has a 3xx status code

func (*PreferencesGetInternalServerError) IsServerError

func (o *PreferencesGetInternalServerError) IsServerError() bool

IsServerError returns true when this preferences get internal server error response has a 5xx status code

func (*PreferencesGetInternalServerError) IsSuccess

func (o *PreferencesGetInternalServerError) IsSuccess() bool

IsSuccess returns true when this preferences get internal server error response has a 2xx status code

func (*PreferencesGetInternalServerError) String

type PreferencesGetNotAcceptable

type PreferencesGetNotAcceptable struct {
}

PreferencesGetNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewPreferencesGetNotAcceptable

func NewPreferencesGetNotAcceptable() *PreferencesGetNotAcceptable

NewPreferencesGetNotAcceptable creates a PreferencesGetNotAcceptable with default headers values

func (*PreferencesGetNotAcceptable) Code

func (o *PreferencesGetNotAcceptable) Code() int

Code gets the status code for the preferences get not acceptable response

func (*PreferencesGetNotAcceptable) Error

func (*PreferencesGetNotAcceptable) IsClientError

func (o *PreferencesGetNotAcceptable) IsClientError() bool

IsClientError returns true when this preferences get not acceptable response has a 4xx status code

func (*PreferencesGetNotAcceptable) IsCode

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

IsCode returns true when this preferences get not acceptable response a status code equal to that given

func (*PreferencesGetNotAcceptable) IsRedirect

func (o *PreferencesGetNotAcceptable) IsRedirect() bool

IsRedirect returns true when this preferences get not acceptable response has a 3xx status code

func (*PreferencesGetNotAcceptable) IsServerError

func (o *PreferencesGetNotAcceptable) IsServerError() bool

IsServerError returns true when this preferences get not acceptable response has a 5xx status code

func (*PreferencesGetNotAcceptable) IsSuccess

func (o *PreferencesGetNotAcceptable) IsSuccess() bool

IsSuccess returns true when this preferences get not acceptable response has a 2xx status code

func (*PreferencesGetNotAcceptable) String

func (o *PreferencesGetNotAcceptable) String() string

type PreferencesGetNotFound

type PreferencesGetNotFound struct {
}

PreferencesGetNotFound describes a response with status code 404, with default header values.

not found

func NewPreferencesGetNotFound

func NewPreferencesGetNotFound() *PreferencesGetNotFound

NewPreferencesGetNotFound creates a PreferencesGetNotFound with default headers values

func (*PreferencesGetNotFound) Code

func (o *PreferencesGetNotFound) Code() int

Code gets the status code for the preferences get not found response

func (*PreferencesGetNotFound) Error

func (o *PreferencesGetNotFound) Error() string

func (*PreferencesGetNotFound) IsClientError

func (o *PreferencesGetNotFound) IsClientError() bool

IsClientError returns true when this preferences get not found response has a 4xx status code

func (*PreferencesGetNotFound) IsCode

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

IsCode returns true when this preferences get not found response a status code equal to that given

func (*PreferencesGetNotFound) IsRedirect

func (o *PreferencesGetNotFound) IsRedirect() bool

IsRedirect returns true when this preferences get not found response has a 3xx status code

func (*PreferencesGetNotFound) IsServerError

func (o *PreferencesGetNotFound) IsServerError() bool

IsServerError returns true when this preferences get not found response has a 5xx status code

func (*PreferencesGetNotFound) IsSuccess

func (o *PreferencesGetNotFound) IsSuccess() bool

IsSuccess returns true when this preferences get not found response has a 2xx status code

func (*PreferencesGetNotFound) String

func (o *PreferencesGetNotFound) String() string

type PreferencesGetOK

type PreferencesGetOK struct {
	Payload interface{}
}

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

PreferencesGetOK preferences get o k

func NewPreferencesGetOK

func NewPreferencesGetOK() *PreferencesGetOK

NewPreferencesGetOK creates a PreferencesGetOK with default headers values

func (*PreferencesGetOK) Code

func (o *PreferencesGetOK) Code() int

Code gets the status code for the preferences get o k response

func (*PreferencesGetOK) Error

func (o *PreferencesGetOK) Error() string

func (*PreferencesGetOK) GetPayload

func (o *PreferencesGetOK) GetPayload() interface{}

func (*PreferencesGetOK) IsClientError

func (o *PreferencesGetOK) IsClientError() bool

IsClientError returns true when this preferences get o k response has a 4xx status code

func (*PreferencesGetOK) IsCode

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

IsCode returns true when this preferences get o k response a status code equal to that given

func (*PreferencesGetOK) IsRedirect

func (o *PreferencesGetOK) IsRedirect() bool

IsRedirect returns true when this preferences get o k response has a 3xx status code

func (*PreferencesGetOK) IsServerError

func (o *PreferencesGetOK) IsServerError() bool

IsServerError returns true when this preferences get o k response has a 5xx status code

func (*PreferencesGetOK) IsSuccess

func (o *PreferencesGetOK) IsSuccess() bool

IsSuccess returns true when this preferences get o k response has a 2xx status code

func (*PreferencesGetOK) String

func (o *PreferencesGetOK) String() string

type PreferencesGetParams

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

PreferencesGetParams contains all the parameters to send to the API endpoint

for the preferences get operation.

Typically these are written to a http.Request.

func NewPreferencesGetParams

func NewPreferencesGetParams() *PreferencesGetParams

NewPreferencesGetParams creates a new PreferencesGetParams 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 NewPreferencesGetParamsWithContext

func NewPreferencesGetParamsWithContext(ctx context.Context) *PreferencesGetParams

NewPreferencesGetParamsWithContext creates a new PreferencesGetParams object with the ability to set a context for a request.

func NewPreferencesGetParamsWithHTTPClient

func NewPreferencesGetParamsWithHTTPClient(client *http.Client) *PreferencesGetParams

NewPreferencesGetParamsWithHTTPClient creates a new PreferencesGetParams object with the ability to set a custom HTTPClient for a request.

func NewPreferencesGetParamsWithTimeout

func NewPreferencesGetParamsWithTimeout(timeout time.Duration) *PreferencesGetParams

NewPreferencesGetParamsWithTimeout creates a new PreferencesGetParams object with the ability to set a timeout on a request.

func (*PreferencesGetParams) SetContext

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

SetContext adds the context to the preferences get params

func (*PreferencesGetParams) SetDefaults

func (o *PreferencesGetParams) SetDefaults()

SetDefaults hydrates default values in the preferences get params (not the query body).

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

func (*PreferencesGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the preferences get params

func (*PreferencesGetParams) SetTimeout

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

SetTimeout adds the timeout to the preferences get params

func (*PreferencesGetParams) WithContext

WithContext adds the context to the preferences get params

func (*PreferencesGetParams) WithDefaults

func (o *PreferencesGetParams) WithDefaults() *PreferencesGetParams

WithDefaults hydrates default values in the preferences get params (not the query body).

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

func (*PreferencesGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the preferences get params

func (*PreferencesGetParams) WithTimeout

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

WithTimeout adds the timeout to the preferences get params

func (*PreferencesGetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PreferencesGetReader

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

PreferencesGetReader is a Reader for the PreferencesGet structure.

func (*PreferencesGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PreferencesGetUnauthorized

type PreferencesGetUnauthorized struct {
}

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

unauthorized

func NewPreferencesGetUnauthorized

func NewPreferencesGetUnauthorized() *PreferencesGetUnauthorized

NewPreferencesGetUnauthorized creates a PreferencesGetUnauthorized with default headers values

func (*PreferencesGetUnauthorized) Code

func (o *PreferencesGetUnauthorized) Code() int

Code gets the status code for the preferences get unauthorized response

func (*PreferencesGetUnauthorized) Error

func (*PreferencesGetUnauthorized) IsClientError

func (o *PreferencesGetUnauthorized) IsClientError() bool

IsClientError returns true when this preferences get unauthorized response has a 4xx status code

func (*PreferencesGetUnauthorized) IsCode

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

IsCode returns true when this preferences get unauthorized response a status code equal to that given

func (*PreferencesGetUnauthorized) IsRedirect

func (o *PreferencesGetUnauthorized) IsRedirect() bool

IsRedirect returns true when this preferences get unauthorized response has a 3xx status code

func (*PreferencesGetUnauthorized) IsServerError

func (o *PreferencesGetUnauthorized) IsServerError() bool

IsServerError returns true when this preferences get unauthorized response has a 5xx status code

func (*PreferencesGetUnauthorized) IsSuccess

func (o *PreferencesGetUnauthorized) IsSuccess() bool

IsSuccess returns true when this preferences get unauthorized response has a 2xx status code

func (*PreferencesGetUnauthorized) String

func (o *PreferencesGetUnauthorized) String() string

Jump to

Keyboard shortcuts

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