web

package
v2.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MainCommand

func MainCommand() *cobra.Command

func NewContextWithWebEngine

func NewContextWithWebEngine(ctx context.Context, webEngine *WebEngine) (context.Context, error)

Types

type EndpointDeclaration

type EndpointDeclaration interface {
	Apply(appContext context.Context, target *gin.RouterGroup)
}

type GroupDeclaration

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

func (*GroupDeclaration) Apply

func (g *GroupDeclaration) Apply(appContext context.Context, target *gin.RouterGroup)

func (*GroupDeclaration) RegisterEndpoint

func (g *GroupDeclaration) RegisterEndpoint(method string, roles []string, handlers ...gin.HandlerFunc)

func (*GroupDeclaration) RegisterEndpointPath

func (g *GroupDeclaration) RegisterEndpointPath(method string, relativePath string, roles []string, handlers ...gin.HandlerFunc)

func (*GroupDeclaration) RegisterGroup

func (g *GroupDeclaration) RegisterGroup(relativePath string, roles []string) *GroupDeclaration

type WebEngine

type WebEngine struct {
	GroupDeclaration
	// contains filtered or unexported fields
}

func NewWebEngine

func NewWebEngine() (*WebEngine, error)

# THE WEBENGINE GETS A SUPPLY OF ENV VARS TO WORK WITH (WHEN it gets deployed by ai-provisioner / deployment server within DSP) # # Security stuff # - JWT_ISSUER the token ISSUER that will be used to validate all provided tokens # (i.e. https://auth.tiki-dsp.io/auth/realms/tiki) # # - OAUTH_CLIENT_ID the client that will be used to validate all provided tokens # (i.e. ai-examples-python-dev-web-py36) # #

func WebEngineFromContext

func WebEngineFromContext(ctx context.Context) *WebEngine

func (*WebEngine) Start

func (s *WebEngine) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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