Documentation ¶
Index ¶
- Variables
- func AssignStruct(pa ActionsParams, st any) error
- func EvalExpr(ex string, env any) (any, error)
- func EvaluateExprs(exprs map[string]any, env any) map[string]any
- func FlattenInterface(i any) map[string]string
- func MapToStructByTags(params map[string]any, dest any) error
- func MergeStringMaps(base map[string]string, over map[string]any) map[string]string
- func RunActions(name string, args []string, with map[string]any) (map[string]any, error)
- func ShowVerbose(i int, name string, req, res map[string]any)
- func StructToMapByTags(src any) (map[string]any, error)
- func TitleCase(st string, char string) string
- func UnflattenInterface(flatMap map[string]string) map[string]any
- type Actions
- type ActionsArgs
- type ActionsClient
- type ActionsParams
- type ActionsPlugin
- type ActionsServer
- type Job
- type JobContext
- type Probe
- type Repeat
- type Step
- type TestContext
- type ValidationError
- type Workflow
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuiltinCmd = "builtin-actions" Handshake = plugin.HandshakeConfig{ProtocolVersion: 1, MagicCookieKey: "probe", MagicCookieValue: "actions"} PluginMap = map[string]plugin.Plugin{"actions": &ActionsPlugin{}} )
Functions ¶
func AssignStruct ¶
func AssignStruct(pa ActionsParams, st any) error
func FlattenInterface ¶
func MapToStructByTags ¶
converting from a map[string]any to a struct
func MergeStringMaps ¶
merge string maps
func RunActions ¶
func StructToMapByTags ¶
converting from a struct to a map[string]any
Types ¶
type ActionsArgs ¶
type ActionsArgs []string
type ActionsClient ¶
type ActionsClient struct {
// contains filtered or unexported fields
}
type ActionsParams ¶
type ActionsPlugin ¶
type ActionsPlugin struct { plugin.Plugin Impl Actions }
func (*ActionsPlugin) GRPCClient ¶
func (p *ActionsPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (any, error)
func (*ActionsPlugin) GRPCServer ¶
func (p *ActionsPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type ActionsServer ¶
type ActionsServer struct {
Impl Actions
}
func (*ActionsServer) Run ¶
func (m *ActionsServer) Run(ctx context.Context, req *pb.RunRequest) (*pb.RunResponse, error)
type Job ¶
type Job struct { Name string `yaml:"name",validate:"required"` Steps []Step `yaml:"steps",validate:"required"` Repeat *Repeat `yaml:"repeat"` Defaults any `yaml:"defaults"` // contains filtered or unexported fields }
func (*Job) Start ¶
func (j *Job) Start(ctx JobContext)
type JobContext ¶
type Probe ¶
type TestContext ¶
type TestContext struct { Envs map[string]string `expr:"env"` Logs []map[string]any `expr:"steps"` Res map[string]any `expr:"res"` Req map[string]any `expr:"req"` }
func NewTestContext ¶
func NewTestContext(j JobContext, req, res map[string]any) TestContext
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
func (*ValidationError) AddMessage ¶
func (e *ValidationError) AddMessage(s string)
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) HasError ¶
func (e *ValidationError) HasError() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.