httpsrv

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: 11 Imported by: 0

Documentation

Overview

Package httpsrv provides the management server for the for the permissions API service.

This code was originally generated by github.com/deepmap/oapi-codegen version v1.12.4 However, it has been modified for it to work in a separate package with our additional middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger *zap.SugaredLogger, cfg ginx.Config) *ginx.Server

Types

type GinServerOptions

type GinServerOptions struct {
	ErrorHandler func(*gin.Context, error, int)
}

GinServerOptions provides options for the Gin server.

type Router

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

Router converts contexts to parameters.

func NewRouter

func NewRouter(store storage.Storage) *Router

NewRouter creates http.Handler with routing matching OpenAPI spec.

func (*Router) AddRolePermission

func (rtr *Router) AddRolePermission(c *gin.Context)

func (*Router) AssignRole

func (rtr *Router) AssignRole(c *gin.Context)

func (*Router) CreateRole

func (rtr *Router) CreateRole(c *gin.Context)

func (*Router) DeleteRole

func (rtr *Router) DeleteRole(c *gin.Context)

func (*Router) ErrorChooser

func (rtr *Router) ErrorChooser(gctx *gin.Context, err error)

func (*Router) ErrorHandler

func (rtr *Router) ErrorHandler(gctx *gin.Context, err error, statusCode int)

func (*Router) GetAssignments

func (rtr *Router) GetAssignments(c *gin.Context)

func (*Router) GetPermissions

func (rtr *Router) GetPermissions(c *gin.Context)

func (*Router) GetRole

func (rtr *Router) GetRole(c *gin.Context)

func (*Router) GetRoleAssignments

func (rtr *Router) GetRoleAssignments(c *gin.Context)

func (*Router) GetRolePermissions

func (rtr *Router) GetRolePermissions(c *gin.Context)

func (*Router) GetRoles

func (rtr *Router) GetRoles(c *gin.Context)

func (*Router) RemoveRoleAssignment

func (rtr *Router) RemoveRoleAssignment(c *gin.Context)

func (*Router) RemoveRolePermission

func (rtr *Router) RemoveRolePermission(c *gin.Context)

func (*Router) Routes

func (rtr *Router) Routes(rg *gin.RouterGroup)

func (*Router) UpdateRole

func (rtr *Router) UpdateRole(c *gin.Context)

Jump to

Keyboard shortcuts

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