roles

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 11 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 roles API

func (*Client) CreateRole

func (a *Client) CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error)

CreateRole creates a new role

func (*Client) ListRoles

func (a *Client) ListRoles(params *ListRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRolesOK, error)

ListRoles lists all roles

func (*Client) RemoveRole

func (a *Client) RemoveRole(params *RemoveRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveRoleNoContent, error)

RemoveRole removes a role

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 is the option for Client methods

type ClientService

type ClientService interface {
	CreateRole(params *CreateRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRoleCreated, error)

	ListRoles(params *ListRolesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRolesOK, error)

	RemoveRole(params *RemoveRoleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RemoveRoleNoContent, 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 roles API client.

type CreateRoleCreated

type CreateRoleCreated struct {
}

CreateRoleCreated describes a response with status code 201, with default header values.

Null response

func NewCreateRoleCreated

func NewCreateRoleCreated() *CreateRoleCreated

NewCreateRoleCreated creates a CreateRoleCreated with default headers values

func (*CreateRoleCreated) Code

func (o *CreateRoleCreated) Code() int

Code gets the status code for the create role created response

func (*CreateRoleCreated) Error

func (o *CreateRoleCreated) Error() string

func (*CreateRoleCreated) IsClientError

func (o *CreateRoleCreated) IsClientError() bool

IsClientError returns true when this create role created response has a 4xx status code

func (*CreateRoleCreated) IsCode

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

IsCode returns true when this create role created response a status code equal to that given

func (*CreateRoleCreated) IsRedirect

func (o *CreateRoleCreated) IsRedirect() bool

IsRedirect returns true when this create role created response has a 3xx status code

func (*CreateRoleCreated) IsServerError

func (o *CreateRoleCreated) IsServerError() bool

IsServerError returns true when this create role created response has a 5xx status code

func (*CreateRoleCreated) IsSuccess

func (o *CreateRoleCreated) IsSuccess() bool

IsSuccess returns true when this create role created response has a 2xx status code

func (*CreateRoleCreated) String

func (o *CreateRoleCreated) String() string

type CreateRoleDefault

type CreateRoleDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

CreateRoleDefault describes a response with status code -1, with default header values.

unexpected error

func NewCreateRoleDefault

func NewCreateRoleDefault(code int) *CreateRoleDefault

NewCreateRoleDefault creates a CreateRoleDefault with default headers values

func (*CreateRoleDefault) Code

func (o *CreateRoleDefault) Code() int

Code gets the status code for the create role default response

func (*CreateRoleDefault) Error

func (o *CreateRoleDefault) Error() string

func (*CreateRoleDefault) GetPayload

func (o *CreateRoleDefault) GetPayload() *models.Error

func (*CreateRoleDefault) IsClientError

func (o *CreateRoleDefault) IsClientError() bool

IsClientError returns true when this create role default response has a 4xx status code

func (*CreateRoleDefault) IsCode

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

IsCode returns true when this create role default response a status code equal to that given

func (*CreateRoleDefault) IsRedirect

func (o *CreateRoleDefault) IsRedirect() bool

IsRedirect returns true when this create role default response has a 3xx status code

func (*CreateRoleDefault) IsServerError

func (o *CreateRoleDefault) IsServerError() bool

IsServerError returns true when this create role default response has a 5xx status code

func (*CreateRoleDefault) IsSuccess

func (o *CreateRoleDefault) IsSuccess() bool

IsSuccess returns true when this create role default response has a 2xx status code

func (*CreateRoleDefault) String

func (o *CreateRoleDefault) String() string

type CreateRoleParams

type CreateRoleParams struct {

	/* Role.

	   The role to create.
	*/
	Role *models.Rolename

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

CreateRoleParams contains all the parameters to send to the API endpoint

for the create role operation.

Typically these are written to a http.Request.

func NewCreateRoleParams

func NewCreateRoleParams() *CreateRoleParams

NewCreateRoleParams creates a new CreateRoleParams 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 NewCreateRoleParamsWithContext

func NewCreateRoleParamsWithContext(ctx context.Context) *CreateRoleParams

NewCreateRoleParamsWithContext creates a new CreateRoleParams object with the ability to set a context for a request.

func NewCreateRoleParamsWithHTTPClient

func NewCreateRoleParamsWithHTTPClient(client *http.Client) *CreateRoleParams

NewCreateRoleParamsWithHTTPClient creates a new CreateRoleParams object with the ability to set a custom HTTPClient for a request.

func NewCreateRoleParamsWithTimeout

func NewCreateRoleParamsWithTimeout(timeout time.Duration) *CreateRoleParams

NewCreateRoleParamsWithTimeout creates a new CreateRoleParams object with the ability to set a timeout on a request.

func (*CreateRoleParams) SetContext

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

SetContext adds the context to the create role params

func (*CreateRoleParams) SetDefaults

func (o *CreateRoleParams) SetDefaults()

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

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

func (*CreateRoleParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create role params

func (*CreateRoleParams) SetRole

func (o *CreateRoleParams) SetRole(role *models.Rolename)

SetRole adds the role to the create role params

func (*CreateRoleParams) SetTimeout

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

SetTimeout adds the timeout to the create role params

func (*CreateRoleParams) WithContext

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

WithContext adds the context to the create role params

func (*CreateRoleParams) WithDefaults

func (o *CreateRoleParams) WithDefaults() *CreateRoleParams

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

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

func (*CreateRoleParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create role params

func (*CreateRoleParams) WithRole

func (o *CreateRoleParams) WithRole(role *models.Rolename) *CreateRoleParams

WithRole adds the role to the create role params

func (*CreateRoleParams) WithTimeout

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

WithTimeout adds the timeout to the create role params

func (*CreateRoleParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateRoleReader

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

CreateRoleReader is a Reader for the CreateRole structure.

func (*CreateRoleReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ListRolesDefault

type ListRolesDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

ListRolesDefault describes a response with status code -1, with default header values.

unexpected error

func NewListRolesDefault

func NewListRolesDefault(code int) *ListRolesDefault

NewListRolesDefault creates a ListRolesDefault with default headers values

func (*ListRolesDefault) Code

func (o *ListRolesDefault) Code() int

Code gets the status code for the list roles default response

func (*ListRolesDefault) Error

func (o *ListRolesDefault) Error() string

func (*ListRolesDefault) GetPayload

func (o *ListRolesDefault) GetPayload() *models.Error

func (*ListRolesDefault) IsClientError

func (o *ListRolesDefault) IsClientError() bool

IsClientError returns true when this list roles default response has a 4xx status code

func (*ListRolesDefault) IsCode

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

IsCode returns true when this list roles default response a status code equal to that given

func (*ListRolesDefault) IsRedirect

func (o *ListRolesDefault) IsRedirect() bool

IsRedirect returns true when this list roles default response has a 3xx status code

func (*ListRolesDefault) IsServerError

func (o *ListRolesDefault) IsServerError() bool

IsServerError returns true when this list roles default response has a 5xx status code

func (*ListRolesDefault) IsSuccess

func (o *ListRolesDefault) IsSuccess() bool

IsSuccess returns true when this list roles default response has a 2xx status code

func (*ListRolesDefault) String

func (o *ListRolesDefault) String() string

type ListRolesOK

type ListRolesOK struct {
	Payload *models.Roles
}

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

A dict containing an array of rolenames

func NewListRolesOK

func NewListRolesOK() *ListRolesOK

NewListRolesOK creates a ListRolesOK with default headers values

func (*ListRolesOK) Code

func (o *ListRolesOK) Code() int

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

func (*ListRolesOK) Error

func (o *ListRolesOK) Error() string

func (*ListRolesOK) GetPayload

func (o *ListRolesOK) GetPayload() *models.Roles

func (*ListRolesOK) IsClientError

func (o *ListRolesOK) IsClientError() bool

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

func (*ListRolesOK) IsCode

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

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

func (*ListRolesOK) IsRedirect

func (o *ListRolesOK) IsRedirect() bool

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

func (*ListRolesOK) IsServerError

func (o *ListRolesOK) IsServerError() bool

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

func (*ListRolesOK) IsSuccess

func (o *ListRolesOK) IsSuccess() bool

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

func (*ListRolesOK) String

func (o *ListRolesOK) String() string

type ListRolesParams

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

ListRolesParams contains all the parameters to send to the API endpoint

for the list roles operation.

Typically these are written to a http.Request.

func NewListRolesParams

func NewListRolesParams() *ListRolesParams

NewListRolesParams creates a new ListRolesParams 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 NewListRolesParamsWithContext

func NewListRolesParamsWithContext(ctx context.Context) *ListRolesParams

NewListRolesParamsWithContext creates a new ListRolesParams object with the ability to set a context for a request.

func NewListRolesParamsWithHTTPClient

func NewListRolesParamsWithHTTPClient(client *http.Client) *ListRolesParams

NewListRolesParamsWithHTTPClient creates a new ListRolesParams object with the ability to set a custom HTTPClient for a request.

func NewListRolesParamsWithTimeout

func NewListRolesParamsWithTimeout(timeout time.Duration) *ListRolesParams

NewListRolesParamsWithTimeout creates a new ListRolesParams object with the ability to set a timeout on a request.

func (*ListRolesParams) SetContext

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

SetContext adds the context to the list roles params

func (*ListRolesParams) SetDefaults

func (o *ListRolesParams) SetDefaults()

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

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

func (*ListRolesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list roles params

func (*ListRolesParams) SetTimeout

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

SetTimeout adds the timeout to the list roles params

func (*ListRolesParams) WithContext

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

WithContext adds the context to the list roles params

func (*ListRolesParams) WithDefaults

func (o *ListRolesParams) WithDefaults() *ListRolesParams

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

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

func (*ListRolesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list roles params

func (*ListRolesParams) WithTimeout

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

WithTimeout adds the timeout to the list roles params

func (*ListRolesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListRolesReader

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

ListRolesReader is a Reader for the ListRoles structure.

func (*ListRolesReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RemoveRoleDefault

type RemoveRoleDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

RemoveRoleDefault describes a response with status code -1, with default header values.

unexpected error

func NewRemoveRoleDefault

func NewRemoveRoleDefault(code int) *RemoveRoleDefault

NewRemoveRoleDefault creates a RemoveRoleDefault with default headers values

func (*RemoveRoleDefault) Code

func (o *RemoveRoleDefault) Code() int

Code gets the status code for the remove role default response

func (*RemoveRoleDefault) Error

func (o *RemoveRoleDefault) Error() string

func (*RemoveRoleDefault) GetPayload

func (o *RemoveRoleDefault) GetPayload() *models.Error

func (*RemoveRoleDefault) IsClientError

func (o *RemoveRoleDefault) IsClientError() bool

IsClientError returns true when this remove role default response has a 4xx status code

func (*RemoveRoleDefault) IsCode

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

IsCode returns true when this remove role default response a status code equal to that given

func (*RemoveRoleDefault) IsRedirect

func (o *RemoveRoleDefault) IsRedirect() bool

IsRedirect returns true when this remove role default response has a 3xx status code

func (*RemoveRoleDefault) IsServerError

func (o *RemoveRoleDefault) IsServerError() bool

IsServerError returns true when this remove role default response has a 5xx status code

func (*RemoveRoleDefault) IsSuccess

func (o *RemoveRoleDefault) IsSuccess() bool

IsSuccess returns true when this remove role default response has a 2xx status code

func (*RemoveRoleDefault) String

func (o *RemoveRoleDefault) String() string

type RemoveRoleNoContent

type RemoveRoleNoContent struct {
}

RemoveRoleNoContent describes a response with status code 204, with default header values.

Null response

func NewRemoveRoleNoContent

func NewRemoveRoleNoContent() *RemoveRoleNoContent

NewRemoveRoleNoContent creates a RemoveRoleNoContent with default headers values

func (*RemoveRoleNoContent) Code

func (o *RemoveRoleNoContent) Code() int

Code gets the status code for the remove role no content response

func (*RemoveRoleNoContent) Error

func (o *RemoveRoleNoContent) Error() string

func (*RemoveRoleNoContent) IsClientError

func (o *RemoveRoleNoContent) IsClientError() bool

IsClientError returns true when this remove role no content response has a 4xx status code

func (*RemoveRoleNoContent) IsCode

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

IsCode returns true when this remove role no content response a status code equal to that given

func (*RemoveRoleNoContent) IsRedirect

func (o *RemoveRoleNoContent) IsRedirect() bool

IsRedirect returns true when this remove role no content response has a 3xx status code

func (*RemoveRoleNoContent) IsServerError

func (o *RemoveRoleNoContent) IsServerError() bool

IsServerError returns true when this remove role no content response has a 5xx status code

func (*RemoveRoleNoContent) IsSuccess

func (o *RemoveRoleNoContent) IsSuccess() bool

IsSuccess returns true when this remove role no content response has a 2xx status code

func (*RemoveRoleNoContent) String

func (o *RemoveRoleNoContent) String() string

type RemoveRoleNotFound

type RemoveRoleNotFound struct {
	Payload *models.NotExists
}

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

Role does not exist

func NewRemoveRoleNotFound

func NewRemoveRoleNotFound() *RemoveRoleNotFound

NewRemoveRoleNotFound creates a RemoveRoleNotFound with default headers values

func (*RemoveRoleNotFound) Code

func (o *RemoveRoleNotFound) Code() int

Code gets the status code for the remove role not found response

func (*RemoveRoleNotFound) Error

func (o *RemoveRoleNotFound) Error() string

func (*RemoveRoleNotFound) GetPayload

func (o *RemoveRoleNotFound) GetPayload() *models.NotExists

func (*RemoveRoleNotFound) IsClientError

func (o *RemoveRoleNotFound) IsClientError() bool

IsClientError returns true when this remove role not found response has a 4xx status code

func (*RemoveRoleNotFound) IsCode

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

IsCode returns true when this remove role not found response a status code equal to that given

func (*RemoveRoleNotFound) IsRedirect

func (o *RemoveRoleNotFound) IsRedirect() bool

IsRedirect returns true when this remove role not found response has a 3xx status code

func (*RemoveRoleNotFound) IsServerError

func (o *RemoveRoleNotFound) IsServerError() bool

IsServerError returns true when this remove role not found response has a 5xx status code

func (*RemoveRoleNotFound) IsSuccess

func (o *RemoveRoleNotFound) IsSuccess() bool

IsSuccess returns true when this remove role not found response has a 2xx status code

func (*RemoveRoleNotFound) String

func (o *RemoveRoleNotFound) String() string

type RemoveRoleParams

type RemoveRoleParams struct {

	/* Force.

	   Whether to delete even if in use

	   Default: true
	*/
	Force *bool

	/* Role.

	   The name of the role to delete
	*/
	Role string

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

RemoveRoleParams contains all the parameters to send to the API endpoint

for the remove role operation.

Typically these are written to a http.Request.

func NewRemoveRoleParams

func NewRemoveRoleParams() *RemoveRoleParams

NewRemoveRoleParams creates a new RemoveRoleParams 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 NewRemoveRoleParamsWithContext

func NewRemoveRoleParamsWithContext(ctx context.Context) *RemoveRoleParams

NewRemoveRoleParamsWithContext creates a new RemoveRoleParams object with the ability to set a context for a request.

func NewRemoveRoleParamsWithHTTPClient

func NewRemoveRoleParamsWithHTTPClient(client *http.Client) *RemoveRoleParams

NewRemoveRoleParamsWithHTTPClient creates a new RemoveRoleParams object with the ability to set a custom HTTPClient for a request.

func NewRemoveRoleParamsWithTimeout

func NewRemoveRoleParamsWithTimeout(timeout time.Duration) *RemoveRoleParams

NewRemoveRoleParamsWithTimeout creates a new RemoveRoleParams object with the ability to set a timeout on a request.

func (*RemoveRoleParams) SetContext

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

SetContext adds the context to the remove role params

func (*RemoveRoleParams) SetDefaults

func (o *RemoveRoleParams) SetDefaults()

SetDefaults hydrates default values in the remove role params (not the query body).

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

func (*RemoveRoleParams) SetForce

func (o *RemoveRoleParams) SetForce(force *bool)

SetForce adds the force to the remove role params

func (*RemoveRoleParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the remove role params

func (*RemoveRoleParams) SetRole

func (o *RemoveRoleParams) SetRole(role string)

SetRole adds the role to the remove role params

func (*RemoveRoleParams) SetTimeout

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

SetTimeout adds the timeout to the remove role params

func (*RemoveRoleParams) WithContext

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

WithContext adds the context to the remove role params

func (*RemoveRoleParams) WithDefaults

func (o *RemoveRoleParams) WithDefaults() *RemoveRoleParams

WithDefaults hydrates default values in the remove role params (not the query body).

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

func (*RemoveRoleParams) WithForce

func (o *RemoveRoleParams) WithForce(force *bool) *RemoveRoleParams

WithForce adds the force to the remove role params

func (*RemoveRoleParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the remove role params

func (*RemoveRoleParams) WithRole

func (o *RemoveRoleParams) WithRole(role string) *RemoveRoleParams

WithRole adds the role to the remove role params

func (*RemoveRoleParams) WithTimeout

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

WithTimeout adds the timeout to the remove role params

func (*RemoveRoleParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type RemoveRoleReader

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

RemoveRoleReader is a Reader for the RemoveRole structure.

func (*RemoveRoleReader) ReadResponse

func (o *RemoveRoleReader) 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