adminroles

package
v0.0.0-...-81acb82 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Overview

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

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

Index

Constants

View Source
const (
	JwtScopes = "jwt.Scopes"
)

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 Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

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 ChiServerOptions

type ChiServerOptions struct {
	BaseURL     string
	BaseRouter  chi.Router
	Middlewares []MiddlewareFunc
}

type CreateVironAdminRoleJSONBody

type CreateVironAdminRoleJSONBody VironAdminRoleCreatePayload

CreateVironAdminRoleJSONBody defines parameters for CreateVironAdminRole.

type CreateVironAdminRoleJSONRequestBody

type CreateVironAdminRoleJSONRequestBody CreateVironAdminRoleJSONBody

CreateVironAdminRoleJSONRequestBody defines body for CreateVironAdminRole for application/json ContentType.

type ListVironAdminRolesParams

type ListVironAdminRolesParams struct {
	// Size of list
	Size *externalRef0.VironPagerSizeQueryParam `json:"size,omitempty"`

	// Page number of list
	Page *externalRef0.VironPagerPageQueryParam `json:"page,omitempty"`
}

ListVironAdminRolesParams defines parameters for ListVironAdminRoles.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type ServerInterface

type ServerInterface interface {
	// list admin roles
	// (GET /viron/adminroles)
	ListVironAdminRoles(w http.ResponseWriter, r *http.Request, params ListVironAdminRolesParams)
	// create an admin role
	// (POST /viron/adminroles)
	CreateVironAdminRole(w http.ResponseWriter, r *http.Request)
	// delete an admin role
	// (DELETE /viron/adminroles/{id})
	RemoveVironAdminRole(w http.ResponseWriter, r *http.Request, id externalRef0.VironIdPathParam)
	// update an admin role
	// (PUT /viron/adminroles/{id})
	UpdateVironAdminRole(w http.ResponseWriter, r *http.Request, id externalRef0.VironIdPathParam)
}

ServerInterface represents all server handlers.

func New

func New() ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CreateVironAdminRole

func (siw *ServerInterfaceWrapper) CreateVironAdminRole(w http.ResponseWriter, r *http.Request)

CreateVironAdminRole operation middleware

func (*ServerInterfaceWrapper) ListVironAdminRoles

func (siw *ServerInterfaceWrapper) ListVironAdminRoles(w http.ResponseWriter, r *http.Request)

ListVironAdminRoles operation middleware

func (*ServerInterfaceWrapper) RemoveVironAdminRole

func (siw *ServerInterfaceWrapper) RemoveVironAdminRole(w http.ResponseWriter, r *http.Request)

RemoveVironAdminRole operation middleware

func (*ServerInterfaceWrapper) UpdateVironAdminRole

func (siw *ServerInterfaceWrapper) UpdateVironAdminRole(w http.ResponseWriter, r *http.Request)

UpdateVironAdminRole operation middleware

type UpdateVironAdminRoleJSONBody

type UpdateVironAdminRoleJSONBody VironAdminRoleUpdatePayload

UpdateVironAdminRoleJSONBody defines parameters for UpdateVironAdminRole.

type UpdateVironAdminRoleJSONRequestBody

type UpdateVironAdminRoleJSONRequestBody UpdateVironAdminRoleJSONBody

UpdateVironAdminRoleJSONRequestBody defines body for UpdateVironAdminRole for application/json ContentType.

type VironAdminRole

type VironAdminRole struct {
	// ロールID
	Id string `json:"id"`

	// 権限
	Permissions []VironAdminRolePermission `json:"permissions"`
}

VironAdminRole defines model for VironAdminRole.

type VironAdminRoleCreatePayload

type VironAdminRoleCreatePayload struct {
	// ロールID
	Id string `json:"id"`

	// 権限
	Permissions []VironAdminRolePermission `json:"permissions"`
}

VironAdminRoleCreatePayload defines model for VironAdminRoleCreatePayload.

type VironAdminRoleList

type VironAdminRoleList []VironAdminRole

VironAdminRoleList defines model for VironAdminRoleList.

type VironAdminRoleListWithPager

type VironAdminRoleListWithPager struct {
	// Embedded struct due to allOf(./components.yaml#/components/schemas/VironPager)
	externalRef0.VironPager `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	List VironAdminRoleList `json:"list"`
}

VironAdminRoleListWithPager defines model for VironAdminRoleListWithPager.

type VironAdminRolePermission

type VironAdminRolePermission struct {
	Permission VironAdminRolePermissionPermission `json:"permission"`
	ResourceId string                             `json:"resourceId"`
}

VironAdminRolePermission defines model for VironAdminRolePermission.

type VironAdminRolePermissionPermission

type VironAdminRolePermissionPermission string

VironAdminRolePermissionPermission defines model for VironAdminRolePermission.Permission.

const (
	VironAdminRolePermissionPermissionAll VironAdminRolePermissionPermission = "all"

	VironAdminRolePermissionPermissionDeny VironAdminRolePermissionPermission = "deny"

	VironAdminRolePermissionPermissionRead VironAdminRolePermissionPermission = "read"

	VironAdminRolePermissionPermissionWrite VironAdminRolePermissionPermission = "write"
)

Defines values for VironAdminRolePermissionPermission.

type VironAdminRoleUpdatePayload

type VironAdminRoleUpdatePayload struct {
	// 権限
	Permissions []VironAdminRolePermission `json:"permissions"`
}

VironAdminRoleUpdatePayload defines model for VironAdminRoleUpdatePayload.

Jump to

Keyboard shortcuts

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