web

package
Version: v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMainCommand added in v2.0.24

func NewMainCommand(engine *WebEngine) *cobra.Command

Types

type GinEndpointDeclaration added in v2.2.9

type GinEndpointDeclaration interface {
	Apply(target *gin.RouterGroup)
}

type GroupDeclaration

type GroupDeclaration interface {
	GinEndpointDeclaration
	RegisterGroup(relativePath string, roles []string) GroupDeclaration
	RegisterEndpoint(method string, roles []string, handlers ...gin.HandlerFunc)
	RegisterEndpointPath(method string, relativePath string, roles []string, handlers ...gin.HandlerFunc)
}

type WebEngine

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

func NewWebEngine

func NewWebEngine(ctx context.Context) *WebEngine

func WebEngineFromContext

func WebEngineFromContext(ctx context.Context) *WebEngine

func (*WebEngine) Start

func (s *WebEngine) Start() error

Start needs a set of set env vars to work. they get set into the gin context and will be supplied to registered endpoints

  • 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)

Jump to

Keyboard shortcuts

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