permissions

package
v0.210.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 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 API

type API interface {
	/*
	   GetPermissions gets system or project level permissions info

	   This endpoint is for retrieving resource and action info that only provides for admin user(system admin and project admin).
	*/
	GetPermissions(ctx context.Context, params *GetPermissionsParams) (*GetPermissionsOK, error)
}

API is the interface of the permissions client

type Client

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

Client for permissions API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client

New creates a new permissions API client.

func (*Client) GetPermissions

func (a *Client) GetPermissions(ctx context.Context, params *GetPermissionsParams) (*GetPermissionsOK, error)

GetPermissions gets system or project level permissions info

This endpoint is for retrieving resource and action info that only provides for admin user(system admin and project admin).

type GetPermissionsForbidden

type GetPermissionsForbidden struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *models.Errors
}

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

Forbidden

func NewGetPermissionsForbidden

func NewGetPermissionsForbidden() *GetPermissionsForbidden

NewGetPermissionsForbidden creates a GetPermissionsForbidden with default headers values

func (*GetPermissionsForbidden) Error

func (o *GetPermissionsForbidden) Error() string

func (*GetPermissionsForbidden) GetPayload

func (o *GetPermissionsForbidden) GetPayload() *models.Errors

func (*GetPermissionsForbidden) IsClientError

func (o *GetPermissionsForbidden) IsClientError() bool

IsClientError returns true when this get permissions forbidden response has a 4xx status code

func (*GetPermissionsForbidden) IsCode

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

IsCode returns true when this get permissions forbidden response a status code equal to that given

func (*GetPermissionsForbidden) IsRedirect

func (o *GetPermissionsForbidden) IsRedirect() bool

IsRedirect returns true when this get permissions forbidden response has a 3xx status code

func (*GetPermissionsForbidden) IsServerError

func (o *GetPermissionsForbidden) IsServerError() bool

IsServerError returns true when this get permissions forbidden response has a 5xx status code

func (*GetPermissionsForbidden) IsSuccess

func (o *GetPermissionsForbidden) IsSuccess() bool

IsSuccess returns true when this get permissions forbidden response has a 2xx status code

func (*GetPermissionsForbidden) String

func (o *GetPermissionsForbidden) String() string

type GetPermissionsInternalServerError

type GetPermissionsInternalServerError struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *models.Errors
}

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

Internal server error

func NewGetPermissionsInternalServerError

func NewGetPermissionsInternalServerError() *GetPermissionsInternalServerError

NewGetPermissionsInternalServerError creates a GetPermissionsInternalServerError with default headers values

func (*GetPermissionsInternalServerError) Error

func (*GetPermissionsInternalServerError) GetPayload

func (*GetPermissionsInternalServerError) IsClientError

func (o *GetPermissionsInternalServerError) IsClientError() bool

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

func (*GetPermissionsInternalServerError) IsCode

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

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

func (*GetPermissionsInternalServerError) IsRedirect

func (o *GetPermissionsInternalServerError) IsRedirect() bool

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

func (*GetPermissionsInternalServerError) IsServerError

func (o *GetPermissionsInternalServerError) IsServerError() bool

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

func (*GetPermissionsInternalServerError) IsSuccess

func (o *GetPermissionsInternalServerError) IsSuccess() bool

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

func (*GetPermissionsInternalServerError) String

type GetPermissionsNotFound

type GetPermissionsNotFound struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *models.Errors
}

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

Not found

func NewGetPermissionsNotFound

func NewGetPermissionsNotFound() *GetPermissionsNotFound

NewGetPermissionsNotFound creates a GetPermissionsNotFound with default headers values

func (*GetPermissionsNotFound) Error

func (o *GetPermissionsNotFound) Error() string

func (*GetPermissionsNotFound) GetPayload

func (o *GetPermissionsNotFound) GetPayload() *models.Errors

func (*GetPermissionsNotFound) IsClientError

func (o *GetPermissionsNotFound) IsClientError() bool

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

func (*GetPermissionsNotFound) IsCode

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

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

func (*GetPermissionsNotFound) IsRedirect

func (o *GetPermissionsNotFound) IsRedirect() bool

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

func (*GetPermissionsNotFound) IsServerError

func (o *GetPermissionsNotFound) IsServerError() bool

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

func (*GetPermissionsNotFound) IsSuccess

func (o *GetPermissionsNotFound) IsSuccess() bool

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

func (*GetPermissionsNotFound) String

func (o *GetPermissionsNotFound) String() string

type GetPermissionsOK

type GetPermissionsOK struct {
	Payload *models.Permissions
}

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

Get permissions successfully.

func NewGetPermissionsOK

func NewGetPermissionsOK() *GetPermissionsOK

NewGetPermissionsOK creates a GetPermissionsOK with default headers values

func (*GetPermissionsOK) Error

func (o *GetPermissionsOK) Error() string

func (*GetPermissionsOK) GetPayload

func (o *GetPermissionsOK) GetPayload() *models.Permissions

func (*GetPermissionsOK) IsClientError

func (o *GetPermissionsOK) IsClientError() bool

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

func (*GetPermissionsOK) IsCode

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

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

func (*GetPermissionsOK) IsRedirect

func (o *GetPermissionsOK) IsRedirect() bool

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

func (*GetPermissionsOK) IsServerError

func (o *GetPermissionsOK) IsServerError() bool

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

func (*GetPermissionsOK) IsSuccess

func (o *GetPermissionsOK) IsSuccess() bool

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

func (*GetPermissionsOK) String

func (o *GetPermissionsOK) String() string

type GetPermissionsParams

type GetPermissionsParams struct {

	/* XRequestID.

	   An unique ID for the request
	*/
	XRequestID *string

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

GetPermissionsParams contains all the parameters to send to the API endpoint

for the get permissions operation.

Typically these are written to a http.Request.

func NewGetPermissionsParams

func NewGetPermissionsParams() *GetPermissionsParams

NewGetPermissionsParams creates a new GetPermissionsParams 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 NewGetPermissionsParamsWithContext

func NewGetPermissionsParamsWithContext(ctx context.Context) *GetPermissionsParams

NewGetPermissionsParamsWithContext creates a new GetPermissionsParams object with the ability to set a context for a request.

func NewGetPermissionsParamsWithHTTPClient

func NewGetPermissionsParamsWithHTTPClient(client *http.Client) *GetPermissionsParams

NewGetPermissionsParamsWithHTTPClient creates a new GetPermissionsParams object with the ability to set a custom HTTPClient for a request.

func NewGetPermissionsParamsWithTimeout

func NewGetPermissionsParamsWithTimeout(timeout time.Duration) *GetPermissionsParams

NewGetPermissionsParamsWithTimeout creates a new GetPermissionsParams object with the ability to set a timeout on a request.

func (*GetPermissionsParams) SetContext

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

SetContext adds the context to the get permissions params

func (*GetPermissionsParams) SetDefaults

func (o *GetPermissionsParams) SetDefaults()

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

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

func (*GetPermissionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get permissions params

func (*GetPermissionsParams) SetTimeout

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

SetTimeout adds the timeout to the get permissions params

func (*GetPermissionsParams) SetXRequestID

func (o *GetPermissionsParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the get permissions params

func (*GetPermissionsParams) WithContext

WithContext adds the context to the get permissions params

func (*GetPermissionsParams) WithDefaults

func (o *GetPermissionsParams) WithDefaults() *GetPermissionsParams

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

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

func (*GetPermissionsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get permissions params

func (*GetPermissionsParams) WithTimeout

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

WithTimeout adds the timeout to the get permissions params

func (*GetPermissionsParams) WithXRequestID

func (o *GetPermissionsParams) WithXRequestID(xRequestID *string) *GetPermissionsParams

WithXRequestID adds the xRequestID to the get permissions params

func (*GetPermissionsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetPermissionsReader

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

GetPermissionsReader is a Reader for the GetPermissions structure.

func (*GetPermissionsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetPermissionsUnauthorized

type GetPermissionsUnauthorized struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *models.Errors
}

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

Unauthorized

func NewGetPermissionsUnauthorized

func NewGetPermissionsUnauthorized() *GetPermissionsUnauthorized

NewGetPermissionsUnauthorized creates a GetPermissionsUnauthorized with default headers values

func (*GetPermissionsUnauthorized) Error

func (*GetPermissionsUnauthorized) GetPayload

func (o *GetPermissionsUnauthorized) GetPayload() *models.Errors

func (*GetPermissionsUnauthorized) IsClientError

func (o *GetPermissionsUnauthorized) IsClientError() bool

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

func (*GetPermissionsUnauthorized) IsCode

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

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

func (*GetPermissionsUnauthorized) IsRedirect

func (o *GetPermissionsUnauthorized) IsRedirect() bool

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

func (*GetPermissionsUnauthorized) IsServerError

func (o *GetPermissionsUnauthorized) IsServerError() bool

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

func (*GetPermissionsUnauthorized) IsSuccess

func (o *GetPermissionsUnauthorized) IsSuccess() bool

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

func (*GetPermissionsUnauthorized) String

func (o *GetPermissionsUnauthorized) String() string

Jump to

Keyboard shortcuts

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