syntax

package
v0.8.0-a.18 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFile

func ValidateFile(f *File) *parse.ErrorList

Types

type CompositeDecl

type CompositeDecl struct {
	S    parse.Span
	Name Ident
	Kind NodeKind
	Body FactoryBody
}

type ConstraintDecl

type ConstraintDecl struct {
	S     parse.Span
	Value parse.Expr
}

type EncryptionDecl

type EncryptionDecl struct {
	S        parse.Span
	Selector Ident
	Body     *parse.ObjectLit
}

type FactoryBody

type FactoryBody struct {
	S              parse.Span
	Description    *parse.StringLit
	Inputs         []InputDecl
	Locals         []LocalDecl
	Constraints    []ConstraintDecl
	Imports        []ImportDecl
	LibraryConfigs []LibraryConfigDecl
	Resources      []NodeDecl
	Data           []NodeDecl
	Actions        []NodeDecl
	Outputs        []OutputDecl
}

type FactoryFile

type FactoryFile struct {
	S    parse.Span
	Body FactoryBody
}

type File

type File struct {
	S        parse.Span
	Kind     FileKind
	Path     string
	Factory  *FactoryFile
	Stack    *StackFile
	Manifest *ManifestFile
	Lock     *LockFile
	Library  *LibraryFile
	Comments []parse.Comment
}

func LowerFile

func LowerFile(f *parse.File) (*File, *parse.ErrorList)

func ParseSource

func ParseSource(path string, b []byte) (*File, error)

type FileKind

type FileKind int
const (
	FileUnknown FileKind = iota
	FileFactory
	FileStack
	FileManifest
	FileLock
	FileLibrary
)

type Ident

type Ident struct {
	S    parse.Span
	Name string
}

type ImportDecl

type ImportDecl struct {
	S     parse.Span
	Alias Ident
	Ref   *parse.StringLit
}

type InputDecl

type InputDecl struct {
	S    parse.Span
	Name Ident
	Body *parse.ObjectLit
	Type parse.TypeExpr
}

type LibraryConfigDecl

type LibraryConfigDecl struct {
	S     parse.Span
	Alias Ident
	Value parse.Expr
}

type LibraryFile

type LibraryFile struct {
	S       parse.Span
	Exports []CompositeDecl
}

type LocalDecl

type LocalDecl struct {
	S     parse.Span
	Name  Ident
	Value parse.Expr
}

type LockDep

type LockDep struct {
	S       parse.Span
	ID      StringKey
	Kind    Ident
	Version *parse.StringLit
	Commit  *parse.StringLit
	Hash    *parse.StringLit
}

type LockFile

type LockFile struct {
	S         parse.Span
	Version   *parse.NumberLit
	Toolchain *LockToolchain
	Deps      []LockDep
}

type LockToolchain

type LockToolchain struct {
	S             parse.Span
	UnobinVersion *parse.StringLit
}

type ManifestFile

type ManifestFile struct {
	S             parse.Span
	UnobinVersion *parse.StringLit
	Requires      []ManifestRequire
	Replace       []ManifestReplace
}

type ManifestReplace

type ManifestReplace struct {
	S    parse.Span
	ID   StringKey
	Path *parse.StringLit
}

type ManifestRequire

type ManifestRequire struct {
	S        parse.Span
	ID       StringKey
	Version  *parse.StringLit
	Indirect *parse.BoolLit
}

type NodeDecl

type NodeDecl struct {
	S        parse.Span
	Kind     NodeKind
	Name     Ident
	Selector NodeSelector
	Body     *parse.ObjectLit
}

type NodeKind

type NodeKind string
const (
	NodeResource NodeKind = "resource"
	NodeData     NodeKind = "data"
	NodeAction   NodeKind = "action"
)

type NodeSelector

type NodeSelector struct {
	S      parse.Span
	Alias  Ident
	Export Ident
}

type OutputDecl

type OutputDecl struct {
	S    parse.Span
	Name Ident
	Body *parse.ObjectLit
}

type StackFactoryBlock

type StackFactoryBlock struct {
	S      parse.Span
	Pin    *parse.ObjectLit
	Inputs *parse.ObjectLit
}

type StackFile

type StackFile struct {
	S           parse.Span
	Factory     *StackFactoryBlock
	State       *StateDecl
	Encryption  *EncryptionDecl
	Locals      []LocalDecl
	Parallelism parse.Expr
}

type StateDecl

type StateDecl struct {
	S        parse.Span
	Selector Ident
	Body     *parse.ObjectLit
}

type StringKey

type StringKey struct {
	S     parse.Span
	Value string
}

Jump to

Keyboard shortcuts

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