 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Compile(programName string, src string, preDeclared []string) (*starlark.Program, error)
- func Optional(name string) scriptletFunction
- func Required(name string) scriptletFunction
- func StarlarkMarshal(input any) (starlark.Value, error)
- func StarlarkUnmarshal(input starlark.Value) (any, error)
- func Validate(compiler func(string, string) (*starlark.Program, error), programName string, ...) error
- type Declaration
- type Loader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Optional ¶
func Optional(name string) scriptletFunction
Optional is a convenience wrapper declaring an optional function.
func Required ¶
func Required(name string) scriptletFunction
Required is a convenience wrapper declaring a required function.
func StarlarkMarshal ¶
StarlarkMarshal converts input to a starlark Value. It only includes exported struct fields, and uses the "json" tag for field names.
func StarlarkUnmarshal ¶
StarlarkUnmarshal converts a Starlark value into a Go value. Only NoneType, Bool, Int, Float, String, List and Dict are supported.
Types ¶
type Declaration ¶
type Declaration = map[scriptletFunction][]string
Declaration is a type alias to make scriptlet declaration easier.
type Loader ¶
type Loader struct {
	// contains filtered or unexported fields
}
    Loader holds the programs for the scriptlet.
 Click to show internal directories. 
   Click to hide internal directories.