apps

package
v0.0.0-...-6bd88e3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: AGPL-3.0-or-later Imports: 11 Imported by: 1

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 WithContentTypeApplicationXML

func WithContentTypeApplicationXML(r *runtime.ClientOperation)

WithContentTypeApplicationXML sets the Content-Type header to "application/xml".

func WithContentTypeApplicationxWwwFormUrlencoded

func WithContentTypeApplicationxWwwFormUrlencoded(r *runtime.ClientOperation)

WithContentTypeApplicationxWwwFormUrlencoded sets the Content-Type header to "application/x-www-form-urlencoded".

Types

type AppCreateBadRequest

type AppCreateBadRequest struct {
}

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

bad request

func NewAppCreateBadRequest

func NewAppCreateBadRequest() *AppCreateBadRequest

NewAppCreateBadRequest creates a AppCreateBadRequest with default headers values

func (*AppCreateBadRequest) Code

func (o *AppCreateBadRequest) Code() int

Code gets the status code for the app create bad request response

func (*AppCreateBadRequest) Error

func (o *AppCreateBadRequest) Error() string

func (*AppCreateBadRequest) IsClientError

func (o *AppCreateBadRequest) IsClientError() bool

IsClientError returns true when this app create bad request response has a 4xx status code

func (*AppCreateBadRequest) IsCode

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

IsCode returns true when this app create bad request response a status code equal to that given

func (*AppCreateBadRequest) IsRedirect

func (o *AppCreateBadRequest) IsRedirect() bool

IsRedirect returns true when this app create bad request response has a 3xx status code

func (*AppCreateBadRequest) IsServerError

func (o *AppCreateBadRequest) IsServerError() bool

IsServerError returns true when this app create bad request response has a 5xx status code

func (*AppCreateBadRequest) IsSuccess

func (o *AppCreateBadRequest) IsSuccess() bool

IsSuccess returns true when this app create bad request response has a 2xx status code

func (*AppCreateBadRequest) String

func (o *AppCreateBadRequest) String() string

type AppCreateForbidden

type AppCreateForbidden struct {
}

AppCreateForbidden describes a response with status code 403, with default header values.

forbidden

func NewAppCreateForbidden

func NewAppCreateForbidden() *AppCreateForbidden

NewAppCreateForbidden creates a AppCreateForbidden with default headers values

func (*AppCreateForbidden) Code

func (o *AppCreateForbidden) Code() int

Code gets the status code for the app create forbidden response

func (*AppCreateForbidden) Error

func (o *AppCreateForbidden) Error() string

func (*AppCreateForbidden) IsClientError

func (o *AppCreateForbidden) IsClientError() bool

IsClientError returns true when this app create forbidden response has a 4xx status code

func (*AppCreateForbidden) IsCode

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

IsCode returns true when this app create forbidden response a status code equal to that given

func (*AppCreateForbidden) IsRedirect

func (o *AppCreateForbidden) IsRedirect() bool

IsRedirect returns true when this app create forbidden response has a 3xx status code

func (*AppCreateForbidden) IsServerError

func (o *AppCreateForbidden) IsServerError() bool

IsServerError returns true when this app create forbidden response has a 5xx status code

func (*AppCreateForbidden) IsSuccess

func (o *AppCreateForbidden) IsSuccess() bool

IsSuccess returns true when this app create forbidden response has a 2xx status code

func (*AppCreateForbidden) String

func (o *AppCreateForbidden) String() string

type AppCreateInternalServerError

type AppCreateInternalServerError struct {
}

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

internal server error

func NewAppCreateInternalServerError

func NewAppCreateInternalServerError() *AppCreateInternalServerError

NewAppCreateInternalServerError creates a AppCreateInternalServerError with default headers values

func (*AppCreateInternalServerError) Code

Code gets the status code for the app create internal server error response

func (*AppCreateInternalServerError) Error

func (*AppCreateInternalServerError) IsClientError

func (o *AppCreateInternalServerError) IsClientError() bool

IsClientError returns true when this app create internal server error response has a 4xx status code

func (*AppCreateInternalServerError) IsCode

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

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

func (*AppCreateInternalServerError) IsRedirect

func (o *AppCreateInternalServerError) IsRedirect() bool

IsRedirect returns true when this app create internal server error response has a 3xx status code

func (*AppCreateInternalServerError) IsServerError

func (o *AppCreateInternalServerError) IsServerError() bool

IsServerError returns true when this app create internal server error response has a 5xx status code

func (*AppCreateInternalServerError) IsSuccess

func (o *AppCreateInternalServerError) IsSuccess() bool

IsSuccess returns true when this app create internal server error response has a 2xx status code

func (*AppCreateInternalServerError) String

type AppCreateNotAcceptable

type AppCreateNotAcceptable struct {
}

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

not acceptable

func NewAppCreateNotAcceptable

func NewAppCreateNotAcceptable() *AppCreateNotAcceptable

NewAppCreateNotAcceptable creates a AppCreateNotAcceptable with default headers values

func (*AppCreateNotAcceptable) Code

func (o *AppCreateNotAcceptable) Code() int

Code gets the status code for the app create not acceptable response

func (*AppCreateNotAcceptable) Error

func (o *AppCreateNotAcceptable) Error() string

func (*AppCreateNotAcceptable) IsClientError

func (o *AppCreateNotAcceptable) IsClientError() bool

IsClientError returns true when this app create not acceptable response has a 4xx status code

func (*AppCreateNotAcceptable) IsCode

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

IsCode returns true when this app create not acceptable response a status code equal to that given

func (*AppCreateNotAcceptable) IsRedirect

func (o *AppCreateNotAcceptable) IsRedirect() bool

IsRedirect returns true when this app create not acceptable response has a 3xx status code

func (*AppCreateNotAcceptable) IsServerError

func (o *AppCreateNotAcceptable) IsServerError() bool

IsServerError returns true when this app create not acceptable response has a 5xx status code

func (*AppCreateNotAcceptable) IsSuccess

func (o *AppCreateNotAcceptable) IsSuccess() bool

IsSuccess returns true when this app create not acceptable response has a 2xx status code

func (*AppCreateNotAcceptable) String

func (o *AppCreateNotAcceptable) String() string

type AppCreateNotFound

type AppCreateNotFound struct {
}

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

not found

func NewAppCreateNotFound

func NewAppCreateNotFound() *AppCreateNotFound

NewAppCreateNotFound creates a AppCreateNotFound with default headers values

func (*AppCreateNotFound) Code

func (o *AppCreateNotFound) Code() int

Code gets the status code for the app create not found response

func (*AppCreateNotFound) Error

func (o *AppCreateNotFound) Error() string

func (*AppCreateNotFound) IsClientError

func (o *AppCreateNotFound) IsClientError() bool

IsClientError returns true when this app create not found response has a 4xx status code

func (*AppCreateNotFound) IsCode

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

IsCode returns true when this app create not found response a status code equal to that given

func (*AppCreateNotFound) IsRedirect

func (o *AppCreateNotFound) IsRedirect() bool

IsRedirect returns true when this app create not found response has a 3xx status code

func (*AppCreateNotFound) IsServerError

func (o *AppCreateNotFound) IsServerError() bool

IsServerError returns true when this app create not found response has a 5xx status code

func (*AppCreateNotFound) IsSuccess

func (o *AppCreateNotFound) IsSuccess() bool

IsSuccess returns true when this app create not found response has a 2xx status code

func (*AppCreateNotFound) String

func (o *AppCreateNotFound) String() string

type AppCreateOK

type AppCreateOK struct {
	Payload *models.Application
}

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

The newly-created application.

func NewAppCreateOK

func NewAppCreateOK() *AppCreateOK

NewAppCreateOK creates a AppCreateOK with default headers values

func (*AppCreateOK) Code

func (o *AppCreateOK) Code() int

Code gets the status code for the app create o k response

func (*AppCreateOK) Error

func (o *AppCreateOK) Error() string

func (*AppCreateOK) GetPayload

func (o *AppCreateOK) GetPayload() *models.Application

func (*AppCreateOK) IsClientError

func (o *AppCreateOK) IsClientError() bool

IsClientError returns true when this app create o k response has a 4xx status code

func (*AppCreateOK) IsCode

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

IsCode returns true when this app create o k response a status code equal to that given

func (*AppCreateOK) IsRedirect

func (o *AppCreateOK) IsRedirect() bool

IsRedirect returns true when this app create o k response has a 3xx status code

func (*AppCreateOK) IsServerError

func (o *AppCreateOK) IsServerError() bool

IsServerError returns true when this app create o k response has a 5xx status code

func (*AppCreateOK) IsSuccess

func (o *AppCreateOK) IsSuccess() bool

IsSuccess returns true when this app create o k response has a 2xx status code

func (*AppCreateOK) String

func (o *AppCreateOK) String() string

type AppCreateParams

type AppCreateParams struct {

	/* ClientName.

	   The name of the application.
	*/
	ClientName string

	/* RedirectUris.

	     Where the user should be redirected after authorization.

	To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter.
	*/
	RedirectURIs string

	/* Scopes.

	     Space separated list of scopes.

	If no scopes are provided, defaults to `read`.
	*/
	Scopes *string

	/* Website.

	   A URL to the web page of the app (optional).
	*/
	Website *string

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

AppCreateParams contains all the parameters to send to the API endpoint

for the app create operation.

Typically these are written to a http.Request.

func NewAppCreateParams

func NewAppCreateParams() *AppCreateParams

NewAppCreateParams creates a new AppCreateParams 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 NewAppCreateParamsWithContext

func NewAppCreateParamsWithContext(ctx context.Context) *AppCreateParams

NewAppCreateParamsWithContext creates a new AppCreateParams object with the ability to set a context for a request.

func NewAppCreateParamsWithHTTPClient

func NewAppCreateParamsWithHTTPClient(client *http.Client) *AppCreateParams

NewAppCreateParamsWithHTTPClient creates a new AppCreateParams object with the ability to set a custom HTTPClient for a request.

func NewAppCreateParamsWithTimeout

func NewAppCreateParamsWithTimeout(timeout time.Duration) *AppCreateParams

NewAppCreateParamsWithTimeout creates a new AppCreateParams object with the ability to set a timeout on a request.

func (*AppCreateParams) SetClientName

func (o *AppCreateParams) SetClientName(clientName string)

SetClientName adds the clientName to the app create params

func (*AppCreateParams) SetContext

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

SetContext adds the context to the app create params

func (*AppCreateParams) SetDefaults

func (o *AppCreateParams) SetDefaults()

SetDefaults hydrates default values in the app create params (not the query body).

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

func (*AppCreateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the app create params

func (*AppCreateParams) SetRedirectURIs

func (o *AppCreateParams) SetRedirectURIs(redirectUris string)

SetRedirectURIs adds the redirectUris to the app create params

func (*AppCreateParams) SetScopes

func (o *AppCreateParams) SetScopes(scopes *string)

SetScopes adds the scopes to the app create params

func (*AppCreateParams) SetTimeout

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

SetTimeout adds the timeout to the app create params

func (*AppCreateParams) SetWebsite

func (o *AppCreateParams) SetWebsite(website *string)

SetWebsite adds the website to the app create params

func (*AppCreateParams) WithClientName

func (o *AppCreateParams) WithClientName(clientName string) *AppCreateParams

WithClientName adds the clientName to the app create params

func (*AppCreateParams) WithContext

func (o *AppCreateParams) WithContext(ctx context.Context) *AppCreateParams

WithContext adds the context to the app create params

func (*AppCreateParams) WithDefaults

func (o *AppCreateParams) WithDefaults() *AppCreateParams

WithDefaults hydrates default values in the app create params (not the query body).

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

func (*AppCreateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the app create params

func (*AppCreateParams) WithRedirectURIs

func (o *AppCreateParams) WithRedirectURIs(redirectUris string) *AppCreateParams

WithRedirectURIs adds the redirectUris to the app create params

func (*AppCreateParams) WithScopes

func (o *AppCreateParams) WithScopes(scopes *string) *AppCreateParams

WithScopes adds the scopes to the app create params

func (*AppCreateParams) WithTimeout

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

WithTimeout adds the timeout to the app create params

func (*AppCreateParams) WithWebsite

func (o *AppCreateParams) WithWebsite(website *string) *AppCreateParams

WithWebsite adds the website to the app create params

func (*AppCreateParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type AppCreateReader

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

AppCreateReader is a Reader for the AppCreate structure.

func (*AppCreateReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type AppCreateUnauthorized

type AppCreateUnauthorized struct {
}

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

unauthorized

func NewAppCreateUnauthorized

func NewAppCreateUnauthorized() *AppCreateUnauthorized

NewAppCreateUnauthorized creates a AppCreateUnauthorized with default headers values

func (*AppCreateUnauthorized) Code

func (o *AppCreateUnauthorized) Code() int

Code gets the status code for the app create unauthorized response

func (*AppCreateUnauthorized) Error

func (o *AppCreateUnauthorized) Error() string

func (*AppCreateUnauthorized) IsClientError

func (o *AppCreateUnauthorized) IsClientError() bool

IsClientError returns true when this app create unauthorized response has a 4xx status code

func (*AppCreateUnauthorized) IsCode

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

IsCode returns true when this app create unauthorized response a status code equal to that given

func (*AppCreateUnauthorized) IsRedirect

func (o *AppCreateUnauthorized) IsRedirect() bool

IsRedirect returns true when this app create unauthorized response has a 3xx status code

func (*AppCreateUnauthorized) IsServerError

func (o *AppCreateUnauthorized) IsServerError() bool

IsServerError returns true when this app create unauthorized response has a 5xx status code

func (*AppCreateUnauthorized) IsSuccess

func (o *AppCreateUnauthorized) IsSuccess() bool

IsSuccess returns true when this app create unauthorized response has a 2xx status code

func (*AppCreateUnauthorized) String

func (o *AppCreateUnauthorized) String() string

type Client

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

Client for apps API

func (*Client) AppCreate

func (a *Client) AppCreate(params *AppCreateParams, opts ...ClientOption) (*AppCreateOK, error)
AppCreate registers a new application on this instance

The registered application can be used to obtain an application token.

This can then be used to register a new account, or (through user auth) obtain an access token.

The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'.

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 {
	AppCreate(params *AppCreateParams, opts ...ClientOption) (*AppCreateOK, 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 apps API client.

func NewClientWithBasicAuth

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

New creates a new apps 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 apps 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.

Jump to

Keyboard shortcuts

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