Documentation ¶
Index ¶
- Constants
- func InitSource(a pluginapi.ApplicationSupport) error
- func MandatoryOptions(options map[string]string, pairs []OptionReq) error
- func NewHttpRestServerGenerator() pluginapi.SourceConnectorGenerator
- func OptionalOptions(options map[string]string, pairs []OptionReq)
- type AuthJwtPlugin
- type CorsPlugin
- type HttpRestServerGenerator
- func (h *HttpRestServerGenerator) GenerateSourceConnectorInstance(req pluginapi.SourceConnectorGenerateRequest) (pluginapi.SourceConnector, error)
- func (h *HttpRestServerGenerator) InitializeSubGeneratorInstance(req pluginapi.CommonSourceConnectorGenerateRequest) (pluginapi.SourceConnectorGenerator, error)
- func (h *HttpRestServerGenerator) OriginalGeneratorNames() []string
- func (h *HttpRestServerGenerator) Reload() error
- func (h *HttpRestServerGenerator) Start() error
- func (h *HttpRestServerGenerator) Startup() error
- func (h *HttpRestServerGenerator) Stop() error
- type OptionReq
- type PluginInitializer
Constants ¶
View Source
const ( ParamHttpBodyPrefix = "http/body/" ParamHttpQueryStringPrefix = "http/query_string/" ParamHttpHeaderPrefix = "http/header/" TypeHttpRest = "http_rest" TypeHttpTemplate = "http_template" TypeHttpStaticFile = "http_static_file" )
View Source
const ( ConfCorsAllowAll = "cors.allow_all" ConfCorsOrigin = "cors.allowed_origin" ConfCorsMethod = "cors.allowed_method" ConfCorsHeader = "cors.allowed_header" ConfCorsExposedHeader = "cors.exposed_header" ConfCorsAllowCredentials = "cors.allow_credentials" ConfCorsMaxAge = "cors.max_age" )
View Source
const ( ConfJwtAlg = "auth.jwt.alg" ConfJwtSignKey = "auth.jwt.signkey" ConfJwtVerifyKey = "auth.jwt.verifykey" )
Variables ¶
This section is empty.
Functions ¶
func InitSource ¶
func InitSource(a pluginapi.ApplicationSupport) error
func MandatoryOptions ¶ added in v0.0.4
func NewHttpRestServerGenerator ¶
func NewHttpRestServerGenerator() pluginapi.SourceConnectorGenerator
func OptionalOptions ¶ added in v0.0.4
Types ¶
type AuthJwtPlugin ¶ added in v0.0.4
type AuthJwtPlugin struct {
// contains filtered or unexported fields
}
func NewAuthJwtPlugin ¶ added in v0.0.4
func NewAuthJwtPlugin(options map[string]string) (*AuthJwtPlugin, error)
func (*AuthJwtPlugin) ChiMiddleware ¶ added in v0.0.4
func (a *AuthJwtPlugin) ChiMiddleware() []func(http.Handler) http.Handler
func (*AuthJwtPlugin) JwtAuthData ¶ added in v0.0.4
func (a *AuthJwtPlugin) JwtAuthData(r *http.Request) (interface{}, error)
type CorsPlugin ¶ added in v0.0.4
type CorsPlugin struct {
// contains filtered or unexported fields
}
func NewCorsPlugin ¶ added in v0.0.4
func NewCorsPlugin(options map[string]string) (*CorsPlugin, error)
func (*CorsPlugin) ChiMiddleware ¶ added in v0.0.4
func (c *CorsPlugin) ChiMiddleware() func(http.Handler) http.Handler
type HttpRestServerGenerator ¶
type HttpRestServerGenerator struct {
// contains filtered or unexported fields
}
func (*HttpRestServerGenerator) GenerateSourceConnectorInstance ¶
func (h *HttpRestServerGenerator) GenerateSourceConnectorInstance(req pluginapi.SourceConnectorGenerateRequest) (pluginapi.SourceConnector, error)
func (*HttpRestServerGenerator) InitializeSubGeneratorInstance ¶ added in v0.0.3
func (h *HttpRestServerGenerator) InitializeSubGeneratorInstance(req pluginapi.CommonSourceConnectorGenerateRequest) (pluginapi.SourceConnectorGenerator, error)
func (*HttpRestServerGenerator) OriginalGeneratorNames ¶ added in v0.0.3
func (h *HttpRestServerGenerator) OriginalGeneratorNames() []string
func (*HttpRestServerGenerator) Reload ¶
func (h *HttpRestServerGenerator) Reload() error
func (*HttpRestServerGenerator) Start ¶
func (h *HttpRestServerGenerator) Start() error
func (*HttpRestServerGenerator) Startup ¶ added in v0.0.3
func (h *HttpRestServerGenerator) Startup() error
func (*HttpRestServerGenerator) Stop ¶
func (h *HttpRestServerGenerator) Stop() error
type PluginInitializer ¶ added in v0.0.4
type PluginInitializer struct {
// contains filtered or unexported fields
}
func InitializePlugin ¶ added in v0.0.4
func InitializePlugin(options map[string]string) (PluginInitializer, error)
func (PluginInitializer) InjectRouter ¶ added in v0.0.4
func (p PluginInitializer) InjectRouter(r chi.Router)
Click to show internal directories.
Click to hide internal directories.