v1

package
v0.0.0-...-7101101 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewAddRolePermissionRequest

func NewAddRolePermissionRequest(server string, id EntityID, body AddRolePermissionJSONRequestBody) (*http.Request, error)

NewAddRolePermissionRequest calls the generic AddRolePermission builder with application/json body

func NewAddRolePermissionRequestWithBody

func NewAddRolePermissionRequestWithBody(server string, id EntityID, contentType string, body io.Reader) (*http.Request, error)

NewAddRolePermissionRequestWithBody generates requests for AddRolePermission with any type of body

func NewAssignRoleRequest

func NewAssignRoleRequest(server string, id EntityID, body AssignRoleJSONRequestBody) (*http.Request, error)

NewAssignRoleRequest calls the generic AssignRole builder with application/json body

func NewAssignRoleRequestWithBody

func NewAssignRoleRequestWithBody(server string, id EntityID, contentType string, body io.Reader) (*http.Request, error)

NewAssignRoleRequestWithBody generates requests for AssignRole with any type of body

func NewCreateRoleRequest

func NewCreateRoleRequest(server string, body CreateRoleJSONRequestBody) (*http.Request, error)

NewCreateRoleRequest calls the generic CreateRole builder with application/json body

func NewCreateRoleRequestWithBody

func NewCreateRoleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateRoleRequestWithBody generates requests for CreateRole with any type of body

func NewDeleteRoleRequest

func NewDeleteRoleRequest(server string, id EntityID) (*http.Request, error)

NewDeleteRoleRequest generates requests for DeleteRole

func NewGetAssignmentsRequest

func NewGetAssignmentsRequest(server string, params *GetAssignmentsParams) (*http.Request, error)

NewGetAssignmentsRequest generates requests for GetAssignments

func NewGetPermissionsRequest

func NewGetPermissionsRequest(server string, params *GetPermissionsParams) (*http.Request, error)

NewGetPermissionsRequest generates requests for GetPermissions

func NewGetRoleAssignmentsRequest

func NewGetRoleAssignmentsRequest(server string, id EntityID) (*http.Request, error)

NewGetRoleAssignmentsRequest generates requests for GetRoleAssignments

func NewGetRolePermissionsRequest

func NewGetRolePermissionsRequest(server string, id EntityID) (*http.Request, error)

NewGetRolePermissionsRequest generates requests for GetRolePermissions

func NewGetRoleRequest

func NewGetRoleRequest(server string, id EntityID) (*http.Request, error)

NewGetRoleRequest generates requests for GetRole

func NewGetRolesRequest

func NewGetRolesRequest(server string) (*http.Request, error)

NewGetRolesRequest generates requests for GetRoles

func NewRemoveRoleAssignmentRequest

func NewRemoveRoleAssignmentRequest(server string, id EntityID, body RemoveRoleAssignmentJSONRequestBody) (*http.Request, error)

NewRemoveRoleAssignmentRequest calls the generic RemoveRoleAssignment builder with application/json body

func NewRemoveRoleAssignmentRequestWithBody

func NewRemoveRoleAssignmentRequestWithBody(server string, id EntityID, contentType string, body io.Reader) (*http.Request, error)

NewRemoveRoleAssignmentRequestWithBody generates requests for RemoveRoleAssignment with any type of body

func NewRemoveRolePermissionRequest

func NewRemoveRolePermissionRequest(server string, id EntityID, body RemoveRolePermissionJSONRequestBody) (*http.Request, error)

NewRemoveRolePermissionRequest calls the generic RemoveRolePermission builder with application/json body

func NewRemoveRolePermissionRequestWithBody

func NewRemoveRolePermissionRequestWithBody(server string, id EntityID, contentType string, body io.Reader) (*http.Request, error)

NewRemoveRolePermissionRequestWithBody generates requests for RemoveRolePermission with any type of body

func NewUpdateRoleRequest

func NewUpdateRoleRequest(server string, id EntityID, body UpdateRoleJSONRequestBody) (*http.Request, error)

NewUpdateRoleRequest calls the generic UpdateRole builder with application/json body

func NewUpdateRoleRequestWithBody

func NewUpdateRoleRequestWithBody(server string, id EntityID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateRoleRequestWithBody generates requests for UpdateRole with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AddRolePermissionJSONRequestBody

type AddRolePermissionJSONRequestBody = PermissionIdentifier

AddRolePermissionJSONRequestBody defines body for AddRolePermission for application/json ContentType.

type AddRolePermissionResponse

type AddRolePermissionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseAddRolePermissionResponse

func ParseAddRolePermissionResponse(rsp *http.Response) (*AddRolePermissionResponse, error)

ParseAddRolePermissionResponse parses an HTTP response from a AddRolePermissionWithResponse call

func (AddRolePermissionResponse) Status

func (r AddRolePermissionResponse) Status() string

Status returns HTTPResponse.Status

func (AddRolePermissionResponse) StatusCode

func (r AddRolePermissionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AssignRoleJSONRequestBody

type AssignRoleJSONRequestBody = NewRoleAssignment

AssignRoleJSONRequestBody defines body for AssignRole for application/json ContentType.

type AssignRoleResponse

type AssignRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseAssignRoleResponse

func ParseAssignRoleResponse(rsp *http.Response) (*AssignRoleResponse, error)

ParseAssignRoleResponse parses an HTTP response from a AssignRoleWithResponse call

func (AssignRoleResponse) Status

func (r AssignRoleResponse) Status() string

Status returns HTTPResponse.Status

func (AssignRoleResponse) StatusCode

func (r AssignRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Assignment

type Assignment struct {
	Role    EntityID `json:"role"`
	Scope   string   `json:"scope"`
	Subject string   `json:"subject"`
}

Assignment defines model for Assignment.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddRolePermission

func (c *Client) AddRolePermission(ctx context.Context, id EntityID, body AddRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddRolePermissionWithBody

func (c *Client) AddRolePermissionWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AssignRole

func (c *Client) AssignRole(ctx context.Context, id EntityID, body AssignRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AssignRoleWithBody

func (c *Client) AssignRoleWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateRole

func (c *Client) CreateRole(ctx context.Context, body CreateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateRoleWithBody

func (c *Client) CreateRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAssignments

func (c *Client) GetAssignments(ctx context.Context, params *GetAssignmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPermissions

func (c *Client) GetPermissions(ctx context.Context, params *GetPermissionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRole

func (c *Client) GetRole(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRoleAssignments

func (c *Client) GetRoleAssignments(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRolePermissions

func (c *Client) GetRolePermissions(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRoles

func (c *Client) GetRoles(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveRoleAssignment

func (c *Client) RemoveRoleAssignment(ctx context.Context, id EntityID, body RemoveRoleAssignmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveRoleAssignmentWithBody

func (c *Client) RemoveRoleAssignmentWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveRolePermission

func (c *Client) RemoveRolePermission(ctx context.Context, id EntityID, body RemoveRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveRolePermissionWithBody

func (c *Client) RemoveRolePermissionWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, id EntityID, body UpdateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateRoleWithBody

func (c *Client) UpdateRoleWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetAssignments request
	GetAssignments(ctx context.Context, params *GetAssignmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPermissions request
	GetPermissions(ctx context.Context, params *GetPermissionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRoles request
	GetRoles(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateRole request with any body
	CreateRoleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateRole(ctx context.Context, body CreateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteRole request
	DeleteRole(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRole request
	GetRole(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateRole request with any body
	UpdateRoleWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateRole(ctx context.Context, id EntityID, body UpdateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveRoleAssignment request with any body
	RemoveRoleAssignmentWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RemoveRoleAssignment(ctx context.Context, id EntityID, body RemoveRoleAssignmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRoleAssignments request
	GetRoleAssignments(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AssignRole request with any body
	AssignRoleWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AssignRole(ctx context.Context, id EntityID, body AssignRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveRolePermission request with any body
	RemoveRolePermissionWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RemoveRolePermission(ctx context.Context, id EntityID, body RemoveRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRolePermissions request
	GetRolePermissions(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddRolePermission request with any body
	AddRolePermissionWithBody(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddRolePermission(ctx context.Context, id EntityID, body AddRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddRolePermissionWithBodyWithResponse

func (c *ClientWithResponses) AddRolePermissionWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddRolePermissionResponse, error)

AddRolePermissionWithBodyWithResponse request with arbitrary body returning *AddRolePermissionResponse

func (*ClientWithResponses) AddRolePermissionWithResponse

func (c *ClientWithResponses) AddRolePermissionWithResponse(ctx context.Context, id EntityID, body AddRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddRolePermissionResponse, error)

func (*ClientWithResponses) AssignRoleWithBodyWithResponse

func (c *ClientWithResponses) AssignRoleWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignRoleResponse, error)

AssignRoleWithBodyWithResponse request with arbitrary body returning *AssignRoleResponse

func (*ClientWithResponses) AssignRoleWithResponse

func (c *ClientWithResponses) AssignRoleWithResponse(ctx context.Context, id EntityID, body AssignRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignRoleResponse, error)

func (*ClientWithResponses) CreateRoleWithBodyWithResponse

func (c *ClientWithResponses) CreateRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRoleResponse, error)

CreateRoleWithBodyWithResponse request with arbitrary body returning *CreateRoleResponse

func (*ClientWithResponses) CreateRoleWithResponse

func (c *ClientWithResponses) CreateRoleWithResponse(ctx context.Context, body CreateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRoleResponse, error)

func (*ClientWithResponses) DeleteRoleWithResponse

func (c *ClientWithResponses) DeleteRoleWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*DeleteRoleResponse, error)

DeleteRoleWithResponse request returning *DeleteRoleResponse

func (*ClientWithResponses) GetAssignmentsWithResponse

func (c *ClientWithResponses) GetAssignmentsWithResponse(ctx context.Context, params *GetAssignmentsParams, reqEditors ...RequestEditorFn) (*GetAssignmentsResponse, error)

GetAssignmentsWithResponse request returning *GetAssignmentsResponse

func (*ClientWithResponses) GetPermissionsWithResponse

func (c *ClientWithResponses) GetPermissionsWithResponse(ctx context.Context, params *GetPermissionsParams, reqEditors ...RequestEditorFn) (*GetPermissionsResponse, error)

GetPermissionsWithResponse request returning *GetPermissionsResponse

func (*ClientWithResponses) GetRoleAssignmentsWithResponse

func (c *ClientWithResponses) GetRoleAssignmentsWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRoleAssignmentsResponse, error)

GetRoleAssignmentsWithResponse request returning *GetRoleAssignmentsResponse

func (*ClientWithResponses) GetRolePermissionsWithResponse

func (c *ClientWithResponses) GetRolePermissionsWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRolePermissionsResponse, error)

GetRolePermissionsWithResponse request returning *GetRolePermissionsResponse

func (*ClientWithResponses) GetRoleWithResponse

func (c *ClientWithResponses) GetRoleWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRoleResponse, error)

GetRoleWithResponse request returning *GetRoleResponse

func (*ClientWithResponses) GetRolesWithResponse

func (c *ClientWithResponses) GetRolesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRolesResponse, error)

GetRolesWithResponse request returning *GetRolesResponse

func (*ClientWithResponses) RemoveRoleAssignmentWithBodyWithResponse

func (c *ClientWithResponses) RemoveRoleAssignmentWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveRoleAssignmentResponse, error)

RemoveRoleAssignmentWithBodyWithResponse request with arbitrary body returning *RemoveRoleAssignmentResponse

func (*ClientWithResponses) RemoveRoleAssignmentWithResponse

func (c *ClientWithResponses) RemoveRoleAssignmentWithResponse(ctx context.Context, id EntityID, body RemoveRoleAssignmentJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveRoleAssignmentResponse, error)

func (*ClientWithResponses) RemoveRolePermissionWithBodyWithResponse

func (c *ClientWithResponses) RemoveRolePermissionWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveRolePermissionResponse, error)

RemoveRolePermissionWithBodyWithResponse request with arbitrary body returning *RemoveRolePermissionResponse

func (*ClientWithResponses) RemoveRolePermissionWithResponse

func (c *ClientWithResponses) RemoveRolePermissionWithResponse(ctx context.Context, id EntityID, body RemoveRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveRolePermissionResponse, error)

func (*ClientWithResponses) UpdateRoleWithBodyWithResponse

func (c *ClientWithResponses) UpdateRoleWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateRoleResponse, error)

UpdateRoleWithBodyWithResponse request with arbitrary body returning *UpdateRoleResponse

func (*ClientWithResponses) UpdateRoleWithResponse

func (c *ClientWithResponses) UpdateRoleWithResponse(ctx context.Context, id EntityID, body UpdateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateRoleResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetAssignments request
	GetAssignmentsWithResponse(ctx context.Context, params *GetAssignmentsParams, reqEditors ...RequestEditorFn) (*GetAssignmentsResponse, error)

	// GetPermissions request
	GetPermissionsWithResponse(ctx context.Context, params *GetPermissionsParams, reqEditors ...RequestEditorFn) (*GetPermissionsResponse, error)

	// GetRoles request
	GetRolesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRolesResponse, error)

	// CreateRole request with any body
	CreateRoleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateRoleResponse, error)

	CreateRoleWithResponse(ctx context.Context, body CreateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateRoleResponse, error)

	// DeleteRole request
	DeleteRoleWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*DeleteRoleResponse, error)

	// GetRole request
	GetRoleWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRoleResponse, error)

	// UpdateRole request with any body
	UpdateRoleWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateRoleResponse, error)

	UpdateRoleWithResponse(ctx context.Context, id EntityID, body UpdateRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateRoleResponse, error)

	// RemoveRoleAssignment request with any body
	RemoveRoleAssignmentWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveRoleAssignmentResponse, error)

	RemoveRoleAssignmentWithResponse(ctx context.Context, id EntityID, body RemoveRoleAssignmentJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveRoleAssignmentResponse, error)

	// GetRoleAssignments request
	GetRoleAssignmentsWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRoleAssignmentsResponse, error)

	// AssignRole request with any body
	AssignRoleWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignRoleResponse, error)

	AssignRoleWithResponse(ctx context.Context, id EntityID, body AssignRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignRoleResponse, error)

	// RemoveRolePermission request with any body
	RemoveRolePermissionWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveRolePermissionResponse, error)

	RemoveRolePermissionWithResponse(ctx context.Context, id EntityID, body RemoveRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveRolePermissionResponse, error)

	// GetRolePermissions request
	GetRolePermissionsWithResponse(ctx context.Context, id EntityID, reqEditors ...RequestEditorFn) (*GetRolePermissionsResponse, error)

	// AddRolePermission request with any body
	AddRolePermissionWithBodyWithResponse(ctx context.Context, id EntityID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddRolePermissionResponse, error)

	AddRolePermissionWithResponse(ctx context.Context, id EntityID, body AddRolePermissionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddRolePermissionResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateRoleJSONRequestBody

type CreateRoleJSONRequestBody = NewRole

CreateRoleJSONRequestBody defines body for CreateRole for application/json ContentType.

type CreateRoleResponse

type CreateRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Role
	JSONDefault  *Error
}

func ParseCreateRoleResponse

func ParseCreateRoleResponse(rsp *http.Response) (*CreateRoleResponse, error)

ParseCreateRoleResponse parses an HTTP response from a CreateRoleWithResponse call

func (CreateRoleResponse) Status

func (r CreateRoleResponse) Status() string

Status returns HTTPResponse.Status

func (CreateRoleResponse) StatusCode

func (r CreateRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteRoleResponse

type DeleteRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseDeleteRoleResponse

func ParseDeleteRoleResponse(rsp *http.Response) (*DeleteRoleResponse, error)

ParseDeleteRoleResponse parses an HTTP response from a DeleteRoleWithResponse call

func (DeleteRoleResponse) Status

func (r DeleteRoleResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteRoleResponse) StatusCode

func (r DeleteRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EntityID

type EntityID uuid.UUID

func ParseEntityID

func ParseEntityID(s string) (EntityID, error)

func (EntityID) String

func (id EntityID) String() string

type Error

type Error struct {
	Code    int32  `json:"code"`
	Message string `json:"message"`
}

Error defines model for Error.

type GetAssignmentsParams

type GetAssignmentsParams struct {
	// Subject subject to return assignments for
	Subject string `form:"subject" json:"subject"`

	// Scope scope to return assignments for
	Scope string `form:"scope" json:"scope"`

	// Role role to return assignments for
	Role *EntityID `form:"role,omitempty" json:"role,omitempty"`
}

GetAssignmentsParams defines parameters for GetAssignments.

type GetAssignmentsResponse

type GetAssignmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Assignment
	JSONDefault  *Error
}

func ParseGetAssignmentsResponse

func ParseGetAssignmentsResponse(rsp *http.Response) (*GetAssignmentsResponse, error)

ParseGetAssignmentsResponse parses an HTTP response from a GetAssignmentsWithResponse call

func (GetAssignmentsResponse) Status

func (r GetAssignmentsResponse) Status() string

Status returns HTTPResponse.Status

func (GetAssignmentsResponse) StatusCode

func (r GetAssignmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPermissionsParams

type GetPermissionsParams struct {
	// Target target to return permission information for
	Target *string `form:"target,omitempty" json:"target,omitempty"`
}

GetPermissionsParams defines parameters for GetPermissions.

type GetPermissionsResponse

type GetPermissionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Permission
	JSONDefault  *Error
}

func ParseGetPermissionsResponse

func ParseGetPermissionsResponse(rsp *http.Response) (*GetPermissionsResponse, error)

ParseGetPermissionsResponse parses an HTTP response from a GetPermissionsWithResponse call

func (GetPermissionsResponse) Status

func (r GetPermissionsResponse) Status() string

Status returns HTTPResponse.Status

func (GetPermissionsResponse) StatusCode

func (r GetPermissionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRoleAssignmentsResponse

type GetRoleAssignmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Assignment
	JSONDefault  *Error
}

func ParseGetRoleAssignmentsResponse

func ParseGetRoleAssignmentsResponse(rsp *http.Response) (*GetRoleAssignmentsResponse, error)

ParseGetRoleAssignmentsResponse parses an HTTP response from a GetRoleAssignmentsWithResponse call

func (GetRoleAssignmentsResponse) Status

Status returns HTTPResponse.Status

func (GetRoleAssignmentsResponse) StatusCode

func (r GetRoleAssignmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRolePermissionsResponse

type GetRolePermissionsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]PermissionIdentifier
	JSONDefault  *Error
}

func ParseGetRolePermissionsResponse

func ParseGetRolePermissionsResponse(rsp *http.Response) (*GetRolePermissionsResponse, error)

ParseGetRolePermissionsResponse parses an HTTP response from a GetRolePermissionsWithResponse call

func (GetRolePermissionsResponse) Status

Status returns HTTPResponse.Status

func (GetRolePermissionsResponse) StatusCode

func (r GetRolePermissionsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRoleResponse

type GetRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Role
	JSONDefault  *Error
}

func ParseGetRoleResponse

func ParseGetRoleResponse(rsp *http.Response) (*GetRoleResponse, error)

ParseGetRoleResponse parses an HTTP response from a GetRoleWithResponse call

func (GetRoleResponse) Status

func (r GetRoleResponse) Status() string

Status returns HTTPResponse.Status

func (GetRoleResponse) StatusCode

func (r GetRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRolesResponse

type GetRolesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]RoleInfo
	JSONDefault  *Error
}

func ParseGetRolesResponse

func ParseGetRolesResponse(rsp *http.Response) (*GetRolesResponse, error)

ParseGetRolesResponse parses an HTTP response from a GetRolesWithResponse call

func (GetRolesResponse) Status

func (r GetRolesResponse) Status() string

Status returns HTTPResponse.Status

func (GetRolesResponse) StatusCode

func (r GetRolesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type NewRole

type NewRole struct {
	Description *string `json:"description,omitempty"`
	Name        string  `json:"name"`
}

NewRole defines model for NewRole.

type NewRoleAssignment

type NewRoleAssignment struct {
	Scope   string `json:"scope"`
	Subject string `json:"subject"`
}

NewRoleAssignment defines model for NewRoleAssignment.

type Permission

type Permission struct {
	Description *string `json:"description,omitempty"`
	Target      string  `json:"target"`
}

Permission defines model for Permission.

type PermissionIdentifier

type PermissionIdentifier struct {
	Target string `json:"target"`
}

PermissionIdentifier defines model for PermissionIdentifier.

type RemoveRoleAssignmentJSONRequestBody

type RemoveRoleAssignmentJSONRequestBody = NewRoleAssignment

RemoveRoleAssignmentJSONRequestBody defines body for RemoveRoleAssignment for application/json ContentType.

type RemoveRoleAssignmentResponse

type RemoveRoleAssignmentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseRemoveRoleAssignmentResponse

func ParseRemoveRoleAssignmentResponse(rsp *http.Response) (*RemoveRoleAssignmentResponse, error)

ParseRemoveRoleAssignmentResponse parses an HTTP response from a RemoveRoleAssignmentWithResponse call

func (RemoveRoleAssignmentResponse) Status

Status returns HTTPResponse.Status

func (RemoveRoleAssignmentResponse) StatusCode

func (r RemoveRoleAssignmentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RemoveRolePermissionJSONRequestBody

type RemoveRolePermissionJSONRequestBody = PermissionIdentifier

RemoveRolePermissionJSONRequestBody defines body for RemoveRolePermission for application/json ContentType.

type RemoveRolePermissionResponse

type RemoveRolePermissionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseRemoveRolePermissionResponse

func ParseRemoveRolePermissionResponse(rsp *http.Response) (*RemoveRolePermissionResponse, error)

ParseRemoveRolePermissionResponse parses an HTTP response from a RemoveRolePermissionWithResponse call

func (RemoveRolePermissionResponse) Status

Status returns HTTPResponse.Status

func (RemoveRolePermissionResponse) StatusCode

func (r RemoveRolePermissionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Role

type Role struct {
	CreatedAt   time.Time     `json:"createdAt"`
	Description *string       `json:"description,omitempty"`
	Id          EntityID      `json:"id"`
	Name        string        `json:"name"`
	Permissions *[]Permission `json:"permissions,omitempty"`
	UpdatedAt   time.Time     `json:"updatedAt"`
}

Role defines model for Role.

type RoleInfo

type RoleInfo struct {
	CreatedAt   time.Time `json:"createdAt"`
	Description *string   `json:"description,omitempty"`
	Id          EntityID  `json:"id"`
	Name        string    `json:"name"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

RoleInfo defines model for RoleInfo.

type UpdateRoleJSONRequestBody

type UpdateRoleJSONRequestBody = Role

UpdateRoleJSONRequestBody defines body for UpdateRole for application/json ContentType.

type UpdateRoleResponse

type UpdateRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Role
	JSONDefault  *Error
}

func ParseUpdateRoleResponse

func ParseUpdateRoleResponse(rsp *http.Response) (*UpdateRoleResponse, error)

ParseUpdateRoleResponse parses an HTTP response from a UpdateRoleWithResponse call

func (UpdateRoleResponse) Status

func (r UpdateRoleResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateRoleResponse) StatusCode

func (r UpdateRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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