Documentation ¶
Index ¶
- func ConfigureAndBuildRouter(starscript string, opts ...WithOption) (*mux.Router, error)
- func SetDBPool(pool *pgxpool.Pool)
- func WithStarlarkHandler(rootdir, starfile string, globals map[string]starlark.Value, ...) func(http.ResponseWriter, *http.Request)
- type Config
- func (cfg *Config) AddRoute(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (cfg *Config) BuildRouter() *mux.Router
- func (cfg *Config) EnableProfilerRoute(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (cfg *Config) GetEnv(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (cfg *Config) NullFn(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func (cfg *Config) SetGlobal(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- type WithOption
- type WithPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureAndBuildRouter ¶
func ConfigureAndBuildRouter(starscript string, opts ...WithOption) (*mux.Router, error)
func WithStarlarkHandler ¶
func WithStarlarkHandler(rootdir, starfile string, globals map[string]starlark.Value, opts ...WithOption) func(http.ResponseWriter, *http.Request)
WithStarlarkHandler returns an http handler function that runs a starlark script
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) BuildRouter ¶
func (*Config) EnableProfilerRoute ¶
type WithOption ¶
type WithOption interface {
Apply(*executor.ManagedThread) error
}
type WithPrinter ¶
func WithNullPrinter ¶
func WithNullPrinter() *WithPrinter
func (*WithPrinter) Apply ¶
func (opt *WithPrinter) Apply(thread *executor.ManagedThread) error
Click to show internal directories.
Click to hide internal directories.