Documentation ¶
Index ¶
- Constants
- func As[T any](t any) (*T, error)
- func Load[T Action](content []byte) (*T, error)
- func RegisterBuilder(typeName string, builder BuilderFunc)
- func Run(ctx context.Context, action Action, space *Space) (any, error)
- func SetActionTracker(actionTracker *ActionTracker)
- func Validate(_ context.Context, input proto.Message) error
- type Action
- type ActionSave
- type ActionStep
- type ActionTracker
- type BuilderFunc
- type Config
- type Space
Constants ¶
View Source
const ( NewWorkspace = "workspace.new" AddModule = "module.add" AddService = "service.add" )
Variables ¶
This section is empty.
Functions ¶
func RegisterBuilder ¶ added in v0.1.20
func RegisterBuilder(typeName string, builder BuilderFunc)
func SetActionTracker ¶ added in v0.0.61
func SetActionTracker(actionTracker *ActionTracker)
Types ¶
type Action ¶
func CreateAction ¶
type ActionSave ¶
type ActionSave struct { Command string `json:"command"` Data json.RawMessage `json:"data"` }
type ActionStep ¶
type ActionStep struct { Step int Data *json.RawMessage `json:"data"` Action Action }
type ActionTracker ¶
func NewActionTracker ¶
func (*ActionTracker) GetActions ¶
func (tracker *ActionTracker) GetActions(_ context.Context) ([]Action, error)
func (*ActionTracker) NextStep ¶
func (tracker *ActionTracker) NextStep() int
func (*ActionTracker) Save ¶
func (tracker *ActionTracker) Save(action Action) error
func (*ActionTracker) WithDir ¶ added in v0.0.52
func (tracker *ActionTracker) WithDir(dir string)
type BuilderFunc ¶ added in v0.1.20
func Wrap ¶
func Wrap[T Action]() BuilderFunc
Wrap function with a constraint that *T satisfies Action
type Space ¶ added in v0.1.89
func (*Space) OnWorkspace ¶ added in v0.1.89
Click to show internal directories.
Click to hide internal directories.