Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrSkipDir = errors.New("Directory does not match build type, skip")
)
errors.
Functions ¶
This section is empty.
Types ¶
type BuildFunctions ¶
BuildFunctions holds all build directives from processed packages.
func BuildPackage ¶
func BuildPackage(vlog metrics.Metrics, events metrics.Metrics, dir string, cmdDir string, cuDir string, binaryPath string, skipBuild bool, removeFiles bool, dontCombineRoot bool, dontBuildSub bool, ctx build.Context) (BuildFunctions, error)
BuildPackage builds a shogun binarie commandline files for giving directory and 1 level directory.
type BuildList ¶
type BuildList struct { Hash string Path string RelPath string FromPackage string FromPackageName string PkgPath string BasePkgPath string BinaryName string CleanBinaryName string Desc string ExecBinaryName string List []gen.WriteDirective Functions []internals.PackageFunctions }
BuildList holds a procssed package list of write directives.
func BuildPackageForDir ¶
func BuildPackageForDir(vlog metrics.Metrics, events metrics.Metrics, dir string, cmd string, currentDir string, binaryPath string, skipBuild bool, remove bool, subs map[string]BuildList, ctx build.Context) (BuildList, error)
BuildPackageForDir generates needed package files for creating new function based executable binaries.
func (BuildList) HasFauxImports ¶
HasFauxImports returns true/false if any part of the function uses faux context.
func (BuildList) HasGoogleImports ¶
HasGoogleImports returns true/false if any part of the function uses faux context.
type FunctionList ¶
type FunctionList struct { Dir string Main PackageFunctionList Subs map[string]PackageFunctionList }
FunctionList holds a list of functions from a main package and all other subpackages retrieved.
func ListFunctions ¶
func ListFunctions(vlog, events metrics.Metrics, targetDir string, ctx build.Context) (FunctionList, error)
ListFunctions returns all functions retrieved from the directory filtered by the build.Context.
type HashList ¶
type HashList struct { Path string `json:"path"` RelPath string `json:"relpath,omitempty"` Hash string `json:"hash"` Package string `json:"package"` Packages map[string]string `json:"packages"` }
HashList holds the list of processed functions from individual packages.
type PackageFunctionList ¶
type PackageFunctionList struct { Path string RelPath string Hash string Package string Name string Desc string List []internals.PackageFunctions }
PackageFunctionList holds the list of processed functions from individual packages.
func ListFunctionsForDir ¶
func ListFunctionsForDir(vlog, events metrics.Metrics, dir string, ctx build.Context) (PackageFunctionList, error)
ListFunctionsForDir iterates all directories and retrieves functon list of all declared functions matching the shegun format.
type PackageHashList ¶
type PackageHashList struct { Dir string `json:"dir"` SuperHash string `json:"super_hash"` Main HashList `json:"main"` Subs map[string]HashList `json:"subs"` }
PackageHashList holds a list of hashes from a main package and all other subpackages retrieved.
func ListPackageHash ¶
func ListPackageHash(vlog, events metrics.Metrics, targetDir string, ctx build.Context) (PackageHashList, error)
ListPackageHash returns all functions retrieved from the directory filtered by the build.Context.