Documentation ¶
Index ¶
Constants ¶
View Source
const (
AnnotationDataValues structmeta.AnnotationName = "data/values"
)
Variables ¶
View Source
var ( AssertAPI = starlark.StringDict{ "assert": &starlarkstruct.Module{ Name: "assert", Members: starlark.StringDict{ "fail": starlark.NewBuiltin("assert.fail", core.ErrWrapper(assertModule{}.Fail)), }, }, } )
View Source
var ( Base64API = starlark.StringDict{ "base64": &starlarkstruct.Module{ Name: "base64", Members: starlark.StringDict{ "encode": starlark.NewBuiltin("base64.encode", core.ErrWrapper(base64Module{}.Encode)), "decode": starlark.NewBuiltin("base64.decode", core.ErrWrapper(base64Module{}.Decode)), }, }, } )
View Source
var ( JSONAPI = starlark.StringDict{ "json": &starlarkstruct.Module{ Name: "json", Members: starlark.StringDict{ "encode": starlark.NewBuiltin("json.encode", core.ErrWrapper(jsonModule{}.Encode)), "decode": starlark.NewBuiltin("json.decode", core.ErrWrapper(jsonModule{}.Decode)), }, }, } )
View Source
var ( MD5API = starlark.StringDict{ "md5": &starlarkstruct.Module{ Name: "md5", Members: starlark.StringDict{ "sum": starlark.NewBuiltin("md5.sum", core.ErrWrapper(md5Module{}.Sum)), }, }, } )
View Source
var ( ModuleAPI = starlark.StringDict{ "module": &starlarkstruct.Module{ Name: "module", Members: starlark.StringDict{ "make": starlark.NewBuiltin("module.make", core.ErrWrapper(starlarkstruct.MakeModule)), }, }, } )
View Source
var ( RegexpAPI = starlark.StringDict{ "regexp": &starlarkstruct.Module{ Name: "regexp", Members: starlark.StringDict{ "match": starlark.NewBuiltin("regexp.match", core.ErrWrapper(regexpModule{}.Match)), }, }, } )
View Source
var ( SHA256API = starlark.StringDict{ "sha256": &starlarkstruct.Module{ Name: "sha256", Members: starlark.StringDict{ "sum": starlark.NewBuiltin("sha256.sum", core.ErrWrapper(sha256Module{}.Sum)), }, }, } )
View Source
var ( StructAPI = starlark.StringDict{ "struct": &starlarkstruct.Module{ Name: "struct", Members: starlark.StringDict{ "make": starlark.NewBuiltin("struct.make", core.ErrWrapper(starlarkstruct.Make)), "make_and_bind": starlark.NewBuiltin("struct.make_and_bind", core.ErrWrapper(structModule{}.MakeAndBind)), "bind": starlark.NewBuiltin("struct.bind", core.ErrWrapper(structModule{}.Bind)), "encode": starlark.NewBuiltin("struct.encode", core.ErrWrapper(structModule{}.Encode)), "decode": starlark.NewBuiltin("struct.decode", core.ErrWrapper(structModule{}.Decode)), }, }, } )
View Source
var ( URLAPI = starlark.StringDict{ "url": &starlarkstruct.Module{ Name: "url", Members: starlark.StringDict{ "path_segment_encode": starlark.NewBuiltin("url.path_segment_encode", core.ErrWrapper(urlModule{}.PathSegmentEncode)), "path_segment_decode": starlark.NewBuiltin("url.path_segment_decode", core.ErrWrapper(urlModule{}.PathSegmentDecode)), "query_param_value_encode": starlark.NewBuiltin("url.query_param_value_encode", core.ErrWrapper(urlModule{}.QueryParamValueEncode)), "query_param_value_decode": starlark.NewBuiltin("url.query_param_value_decode", core.ErrWrapper(urlModule{}.QueryParamValueDecode)), "query_params_encode": starlark.NewBuiltin("url.query_params_encode", core.ErrWrapper(urlModule{}.QueryParamsEncode)), "query_params_decode": starlark.NewBuiltin("url.query_params_decode", core.ErrWrapper(urlModule{}.QueryParamsDecode)), }, }, } )
View Source
var ( YAMLAPI = starlark.StringDict{ "yaml": &starlarkstruct.Module{ Name: "yaml", Members: starlark.StringDict{ "encode": starlark.NewBuiltin("yaml.encode", core.ErrWrapper(yamlModule{}.Encode)), "decode": starlark.NewBuiltin("yaml.decode", core.ErrWrapper(yamlModule{}.Decode)), }, }, } )
Functions ¶
func NewDataModule ¶
func NewDataModule(values interface{}, loader template.CompiledTemplateLoader) dataModule
func NewTemplateModule ¶
func NewTemplateModule(replaceNodeFunc core.StarlarkFunc) templateModule
Types ¶
type API ¶
type API map[string]starlark.StringDict
func NewAPI ¶
func NewAPI(replaceNodeFunc tplcore.StarlarkFunc, values interface{}, loader template.CompiledTemplateLoader) API
type DataValues ¶
type DataValues struct { DocSet *yamlmeta.DocumentSet MetasOpts yamltemplate.MetasOpts }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.