role

package
v0.0.0-...-3c2e68c Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ListRolesBadRequestCode int = 400

ListRolesBadRequestCode is the HTTP code returned for type ListRolesBadRequest

View Source
const ListRolesOKCode int = 200

ListRolesOKCode is the HTTP code returned for type ListRolesOK

Variables

This section is empty.

Functions

This section is empty.

Types

type ListRoles

type ListRoles struct {
	Context *middleware.Context
	Handler ListRolesHandler
}
ListRoles swagger:route GET /role role listRoles

List all roles

List all roles available to current user

func NewListRoles

func NewListRoles(ctx *middleware.Context, handler ListRolesHandler) *ListRoles

NewListRoles creates a new http.Handler for the list roles operation

func (*ListRoles) ServeHTTP

func (o *ListRoles) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type ListRolesBadRequest

type ListRolesBadRequest struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

ListRolesBadRequest Bad Request

swagger:response listRolesBadRequest

func NewListRolesBadRequest

func NewListRolesBadRequest() *ListRolesBadRequest

NewListRolesBadRequest creates ListRolesBadRequest with default headers values

func (*ListRolesBadRequest) SetPayload

func (o *ListRolesBadRequest) SetPayload(payload string)

SetPayload sets the payload to the list roles bad request response

func (*ListRolesBadRequest) WithPayload

func (o *ListRolesBadRequest) WithPayload(payload string) *ListRolesBadRequest

WithPayload adds the payload to the list roles bad request response

func (*ListRolesBadRequest) WriteResponse

func (o *ListRolesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ListRolesDefault

type ListRolesDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

ListRolesDefault generic error response

swagger:response listRolesDefault

func NewListRolesDefault

func NewListRolesDefault(code int) *ListRolesDefault

NewListRolesDefault creates ListRolesDefault with default headers values

func (*ListRolesDefault) SetPayload

func (o *ListRolesDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the list roles default response

func (*ListRolesDefault) SetStatusCode

func (o *ListRolesDefault) SetStatusCode(code int)

SetStatusCode sets the status to the list roles default response

func (*ListRolesDefault) WithPayload

func (o *ListRolesDefault) WithPayload(payload *models.Error) *ListRolesDefault

WithPayload adds the payload to the list roles default response

func (*ListRolesDefault) WithStatusCode

func (o *ListRolesDefault) WithStatusCode(code int) *ListRolesDefault

WithStatusCode adds the status to the list roles default response

func (*ListRolesDefault) WriteResponse

func (o *ListRolesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ListRolesHandler

type ListRolesHandler interface {
	Handle(ListRolesParams, *models.ModelsPrincipal) middleware.Responder
}

ListRolesHandler interface for that can handle valid list roles params

type ListRolesHandlerFunc

type ListRolesHandlerFunc func(ListRolesParams, *models.ModelsPrincipal) middleware.Responder

ListRolesHandlerFunc turns a function with the right signature into a list roles handler

func (ListRolesHandlerFunc) Handle

Handle executing the request and returning a response

type ListRolesOK

type ListRolesOK struct {

	/*
	  In: Body
	*/
	Payload *models.ModelsRoleIDsResponse `json:"body,omitempty"`
}

ListRolesOK OK

swagger:response listRolesOK

func NewListRolesOK

func NewListRolesOK() *ListRolesOK

NewListRolesOK creates ListRolesOK with default headers values

func (*ListRolesOK) SetPayload

func (o *ListRolesOK) SetPayload(payload *models.ModelsRoleIDsResponse)

SetPayload sets the payload to the list roles o k response

func (*ListRolesOK) WithPayload

func (o *ListRolesOK) WithPayload(payload *models.ModelsRoleIDsResponse) *ListRolesOK

WithPayload adds the payload to the list roles o k response

func (*ListRolesOK) WriteResponse

func (o *ListRolesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ListRolesParams

type ListRolesParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`
}

ListRolesParams contains all the bound params for the list roles operation typically these are obtained from a http.Request

swagger:parameters list-roles

func NewListRolesParams

func NewListRolesParams() ListRolesParams

NewListRolesParams creates a new ListRolesParams object

There are no default values defined in the spec.

func (*ListRolesParams) BindRequest

func (o *ListRolesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewListRolesParams() beforehand.

type ListRolesURL

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

ListRolesURL generates an URL for the list roles operation

func (*ListRolesURL) Build

func (o *ListRolesURL) Build() (*url.URL, error)

Build a url path and query string

func (*ListRolesURL) BuildFull

func (o *ListRolesURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ListRolesURL) Must

func (o *ListRolesURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ListRolesURL) SetBasePath

func (o *ListRolesURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ListRolesURL) String

func (o *ListRolesURL) String() string

String returns the string representation of the path with query string

func (*ListRolesURL) StringFull

func (o *ListRolesURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ListRolesURL) WithBasePath

func (o *ListRolesURL) WithBasePath(bp string) *ListRolesURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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