apiRouter

package
v0.0.0-...-9ea7be0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiObjectRouter

type ApiObjectRouter struct {
	Permissions RouteMethodPermissions
	Svcs        *services.APIServices
	Router      *mux.Router
}

func NewAPIRouter

func NewAPIRouter(svcs *services.APIServices, router *mux.Router) ApiObjectRouter

func (*ApiObjectRouter) AddCacheControlledStreamHandler

func (r *ApiObjectRouter) AddCacheControlledStreamHandler(path string, methodPerm MethodPermission, handleFunc handlers.ApiCacheControlledStreamHandlerFunc)

func (*ApiObjectRouter) AddGenericHandler

func (r *ApiObjectRouter) AddGenericHandler(path string, methodPerm MethodPermission, handleFunc handlers.ApiHandlerGenericFunc)

func (*ApiObjectRouter) AddJSONHandler

func (r *ApiObjectRouter) AddJSONHandler(path string, methodPerm MethodPermission, handleFunc handlers.ApiHandlerFunc)

func (*ApiObjectRouter) AddPublicHandler

func (r *ApiObjectRouter) AddPublicHandler(path string, method string, handleFunc handlers.ApiHandlerGenericPublicFunc)

func (*ApiObjectRouter) AddShareHandler

func (r *ApiObjectRouter) AddShareHandler(path string, methodPerm MethodPermission, handleFunc handlers.ApiHandlerFunc)

func (*ApiObjectRouter) AddStreamHandler

func (r *ApiObjectRouter) AddStreamHandler(path string, methodPerm MethodPermission, handleFunc handlers.ApiStreamHandlerFunc)

func (*ApiObjectRouter) GetPermissions

func (r *ApiObjectRouter) GetPermissions() RouteMethodPermissions

type MethodPermission

type MethodPermission struct {
	Method     string
	Permission string
}

func MakeMethodPermission

func MakeMethodPermission(method string, permission string) MethodPermission

type RouteMethodPermissions

type RouteMethodPermissions map[string]string

Jump to

Keyboard shortcuts

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