Documentation ¶
Index ¶
- func ParsePlayArguments(args []string) *symbol.StructSymbol
- func PostCompileFaculty(baseFaculty eval.Faculty, repoPaths []string, repo model.Repo) eval.Faculty
- type Compile
- type CompilePlay
- type CompileResult
- type CompileTest
- type Eval
- type EvalResult
- type GoPrint
- type GoPrintln
- type Play
- type PlayFuncEval
- type PlayResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePlayArguments ¶
func ParsePlayArguments(args []string) *symbol.StructSymbol
ParsePlayArguments parses the given commandline arguments into a struct symbol.
Types ¶
type Compile ¶
type Compile struct { RepoDirs []string `ko:"name=repoDir"` PkgPaths []string `ko:"name=pkgPaths"` Show bool `ko:"name=show"` }
Compile is a service to compile a Ko repository.
type CompilePlay ¶
type CompilePlay struct { Repo []string `ko:"name=repo"` Pkg string `ko:"name=pkg"` Func string `ko:"name=func"` Faculty eval.Faculty `ko:"name=faculty"` Arg *symbol.StructSymbol `ko:"name=arg"` // arg can be nil Show bool `ko:"name=show"` }
CompilePlay is a service that compiles a repository and plays it afterward.
func (*CompilePlay) Play ¶
func (arg *CompilePlay) Play(ctx *runtime.Context) *PlayResult
Play runs the service.
type CompileResult ¶
type CompileResult struct { Compile *Compile `ko:"name=compile"` Repo model.Repo `ko:"name=repo"` Stats *model.RepoStats `ko:"name=stats"` Error error `ko:"name=error"` }
CompileResult holds the result of a compile service.
type CompileTest ¶
type CompileTest struct { Repo []string `ko:"name=repo"` Pkgs []string `ko:"name=pkg"` Faculty eval.Faculty `ko:"name=faculty"` Show bool `ko:"name=show"` }
CompileTest is a service that compiles a repository and runs all tests in it afterward.
func (*CompileTest) Play ¶
func (arg *CompileTest) Play(ctx *runtime.Context) *PlayResult
Play runs the service.
type Eval ¶
type Eval struct {
KoExpr string `ko:"name=koExpr"`
}
Eval is a service that evaluates a Ko expression.
type EvalResult ¶
type EvalResult struct { Eval *Eval `ko:"name=eval"` Error error `ko:"name=error"` Returned symbol.Symbol `ko:"name=returned"` }
EvalResult holds the result of the Eval service.
type Play ¶
type Play struct { Pkg string `ko:"name=pkg"` // e.g. github.com/kocircuit/kocircuit/codelab Func string `ko:"name=func"` // e.g. HelloWorld Repo model.Repo `ko:"name=repo"` // compiled ko repo Faculty eval.Faculty `ko:"name=faculty"` Arg *symbol.StructSymbol `ko:"name=arg"` // arg can be nil }
Play is a service that plays a function in a Ko repository.
type PlayFuncEval ¶
type PlayFuncEval struct { Func *model.Func `ko:"name=func"` Eval *go_eval.Evaluate `ko:"name=eval"` Arg *symbol.StructSymbol `ko:"name=arg"` // arg can be nil }
func (*PlayFuncEval) Play ¶
func (w *PlayFuncEval) Play(ctx *runtime.Context) *PlayResult
type PlayResult ¶
type PlayResult struct { Play *Play `ko:"name=play"` PlayFuncEval *PlayFuncEval `ko:"name=playFuncEval"` Returned symbol.Symbol `ko:"name=returned"` Error error `ko:"name=error"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.