Documentation ¶
Index ¶
- func NewMainCommand(engine *WebEngine) *cobra.Command
- type EndpointDeclaration
- type GroupDeclaration
- func (g *GroupDeclaration) Apply(appContext context.Context, target *gin.RouterGroup)
- func (g *GroupDeclaration) RegisterEndpoint(method string, roles []string, handlers ...gin.HandlerFunc)
- func (g *GroupDeclaration) RegisterEndpointPath(method string, relativePath string, roles []string, ...)
- func (g *GroupDeclaration) RegisterGroup(relativePath string, roles []string) *GroupDeclaration
- type WebEngine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMainCommand ¶ added in v2.0.24
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 { context.Context GroupDeclaration // contains filtered or unexported fields }
func NewWebEngine ¶
func WebEngineFromContext ¶
func (*WebEngine) Start ¶
Start sets a supply of env vars to work with into gin context (when it gets deployed by ai-provisioner / deployment server within DSP)
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)
Click to show internal directories.
Click to hide internal directories.