source

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 MandatoryOptions(options map[string]string, pairs []OptionReq) error

func NewHttpRestServerGenerator

func NewHttpRestServerGenerator() pluginapi.SourceConnectorGenerator

func OptionalOptions added in v0.0.4

func OptionalOptions(options map[string]string, pairs []OptionReq)

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 (*HttpRestServerGenerator) InitializeSubGeneratorInstance added in v0.0.3

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 OptionReq added in v0.0.4

type OptionReq struct {
	Key string
	Val *string
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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