action

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPTIONS_PREFIX = "options-"
)

Variables

This section is empty.

Functions

func GetEmbeddedTemplates added in v0.8.1

func GetEmbeddedTemplates() (map[string][]byte, error)

GetEmbeddedTemplates returns the embedded templates files

func RunDeferredCleanup

func RunDeferredCleanup(thread *starlark.Thread) error

Types

type Action

type Action struct {
	*types.Logger

	AppTemplate *template.Template
	StyleType   types.StyleType
	LightTheme  string
	DarkTheme   string
	// contains filtered or unexported fields
}

Action represents a single action that is exposed by the App. Actions provide a way to trigger app operations, with an auto-generated form UI and an API interface

func NewAction

func NewAction(logger *types.Logger, sourceFS *appfs.SourceFs, isDev bool, name, description, apath string, run, suggest starlark.Callable,
	params []apptype.AppParam, paramValuesStr map[string]string, paramDict starlark.StringDict,
	appPath string, styleType types.StyleType, containerProxyUrl string) (*Action, error)

NewAction creates a new action

func (*Action) BuildRouter

func (a *Action) BuildRouter() (*chi.Mux, error)

type Args

type Args struct {
	// contains filtered or unexported fields
}

Args is a starlark.Value that represents the arguments being passed to the Action handler. It contains value for the params.

func (*Args) Attr

func (a *Args) Attr(name string) (starlark.Value, error)

func (*Args) AttrNames

func (a *Args) AttrNames() []string

func (*Args) Freeze

func (a *Args) Freeze()

func (*Args) Hash

func (a *Args) Hash() (uint32, error)

func (*Args) String

func (a *Args) String() string

func (*Args) Truth

func (a *Args) Truth() starlark.Bool

func (*Args) Type

func (a *Args) Type() string

type ParamDef

type ParamDef struct {
	Name        string
	Description string
	Value       any
	InputType   string
	Options     []string
}

Jump to

Keyboard shortcuts

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