Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrScaffoldingNotFound = ScaffoldingError{"scaffolding not found", nil}
var ErrSignatureNotFound = ScaffoldingError{"supported signature not found", nil}
Functions ¶
func Write ¶
func Write(out, src, runtime, invoke string, fs filesystem.Filesystem) (err error)
Write scaffolding to a given path
Scaffolding is a language-level operation which first detects the method signature used by the function's source code and then writes the appropriate scaffolding.
NOTE: Scaffoding is not per-template, because a template is merely an example starting point for a Function implementation and should have no bearing on the shape that function can eventually take. The language, and optionally invocation hint (For cloudevents) are used for this. For example, there can be multiple templates which exemplify a given method signature, and the implementation can be switched at any time by the author. Language, by contrast, is fixed at time of initialization.
out: the path to output scaffolding src: the path to the source code to scaffold runtime: the expected runtime of the target source code "go", "node" etc. invoke: the optional invocatin hint (default "http") fs: filesytem which contains scaffolding at '[runtime]/scaffolding' (exclusive with 'repo')
Types ¶
type ErrDetectorNotImplemented ¶
type ErrDetectorNotImplemented struct {
Runtime string
}
func (ErrDetectorNotImplemented) Error ¶
func (e ErrDetectorNotImplemented) Error() string
type ErrRuntimeNotRecognized ¶
type ErrRuntimeNotRecognized struct {
Runtime string
}
func (ErrRuntimeNotRecognized) Error ¶
func (e ErrRuntimeNotRecognized) Error() string
type ScaffoldingError ¶
func (ScaffoldingError) Error ¶
func (e ScaffoldingError) Error() string
func (ScaffoldingError) Unwrap ¶
func (e ScaffoldingError) Unwrap() error