Documentation ¶
Overview ¶
This is about parsing Fn-specific dialect of Cue.
Index ¶
- Constants
- Variables
- func InjectedScope(env *schema.Environment) interface{}
- func LoadResource(fsys fs.FS, loc pkggraph.Location, path string) (*schema.FileContents, error)
- func NewFrontend(pl parsing.EarlyPackageLoader, opaqueParser NewSyntaxParser, ...) parsing.Frontend
- func ParseMounts(ctx context.Context, pl parsing.EarlyPackageLoader, loc pkggraph.Location, ...) ([]*schema.Mount, []*schema.Volume, error)
- func ParseResourceInstanceFromCue(ctx context.Context, env *schema.Environment, pl parsing.EarlyPackageLoader, ...) (*schema.ResourceInstance, error)
- func ParseVolumes(ctx context.Context, pl parsing.EarlyPackageLoader, loc pkggraph.Location, ...) ([]*schema.Volume, error)
- type CueResourceInstance
- type EvalFuncs
- type Fetcher
- type FetcherFunc
- func FetchEnv(env *schema.Environment) FetcherFunc
- func FetchPackage(pl pkggraph.PackageLoader) FetcherFunc
- func FetchProto(pl pkggraph.PackageLoader, fsys fs.FS, loc pkggraph.Location) FetcherFunc
- func FetchResource(fsys fs.FS, loc pkggraph.Location) FetcherFunc
- func FetchServer(packages pkggraph.PackageLoader, stack pkggraph.StackEndpoints) FetcherFunc
- func FetchServerWorkspace(loc protos.Location) FetcherFunc
- type NewSyntaxParser
- type ResourceList
- type WorkspaceLoader
Constants ¶
View Source
const ( WorkspaceFile = "ns-workspace.cue" LegacyWorkspaceFile = "fn-workspace.cue" )
Variables ¶
View Source
var (
ConsumeNoValue = &consumeNoValue
)
View Source
var ModuleLoader moduleLoader
Functions ¶
func InjectedScope ¶
func InjectedScope(env *schema.Environment) interface{}
Variables that always available for the user in CUE files, without explicit importing.
func LoadResource ¶
func NewFrontend ¶
func NewFrontend(pl parsing.EarlyPackageLoader, opaqueParser NewSyntaxParser, env *schema.Environment) parsing.Frontend
func ParseMounts ¶
func ParseResourceInstanceFromCue ¶
func ParseResourceInstanceFromCue(ctx context.Context, env *schema.Environment, pl parsing.EarlyPackageLoader, pkg *pkggraph.Package, name string, v *fncue.CueV) (*schema.ResourceInstance, error)
Types ¶
type CueResourceInstance ¶
type EvalFuncs ¶
type EvalFuncs struct {
// contains filtered or unexported fields
}
func (*EvalFuncs) WithFetcher ¶
func (s *EvalFuncs) WithFetcher(key string, f FetcherFunc) *EvalFuncs
type FetcherFunc ¶
func FetchEnv ¶
func FetchEnv(env *schema.Environment) FetcherFunc
func FetchPackage ¶
func FetchPackage(pl pkggraph.PackageLoader) FetcherFunc
func FetchProto ¶
func FetchProto(pl pkggraph.PackageLoader, fsys fs.FS, loc pkggraph.Location) FetcherFunc
func FetchResource ¶
func FetchResource(fsys fs.FS, loc pkggraph.Location) FetcherFunc
func FetchServer ¶
func FetchServer(packages pkggraph.PackageLoader, stack pkggraph.StackEndpoints) FetcherFunc
func FetchServerWorkspace ¶
func FetchServerWorkspace(loc protos.Location) FetcherFunc
type NewSyntaxParser ¶
type ResourceList ¶
func ParseResourceList ¶
func ParseResourceList(v *fncue.CueV) (*ResourceList, error)
func (*ResourceList) ToPack ¶
func (rl *ResourceList) ToPack(ctx context.Context, env *schema.Environment, pl parsing.EarlyPackageLoader, pkg *pkggraph.Package) (*schema.ResourcePack, error)
type WorkspaceLoader ¶
type WorkspaceLoader struct {
PackageLoader parsing.EarlyPackageLoader
}
func (WorkspaceLoader) SnapshotDir ¶
func (wl WorkspaceLoader) SnapshotDir(ctx context.Context, pkgname schema.PackageName, opts memfs.SnapshotOpts) (*fncue.PackageContents, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.