Documentation
¶
Index ¶
- func IsValidRuntimeTemplateName(ctx context.Context, dir string, runtime string, name string) bool
- type AppendFileStep
- type Bundle
- type CloneRepoAction
- type CommandStep
- type CopyDirAction
- type CopyFileAction
- type CreateFileAction
- type DeleteFileActionStep
- type Deployment
- type Development
- type ErrRequirementsNotMet
- type LanguageTemplates
- type ModifyPackageJsonStep
- type ModifyTsConfigStep
- type NewAgentSteps
- type NewProjectSteps
- type ProjectTemplate
- type Requirement
- type Resources
- type Step
- type Template
- type TemplateContext
- type TemplateRules
- type Templates
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppendFileStep ¶
func (*AppendFileStep) Run ¶
func (s *AppendFileStep) Run(ctx TemplateContext) error
type CloneRepoAction ¶ added in v0.0.86
func (*CloneRepoAction) Run ¶ added in v0.0.86
func (s *CloneRepoAction) Run(ctx TemplateContext) error
type CommandStep ¶
func (*CommandStep) Run ¶
func (s *CommandStep) Run(ctx TemplateContext) error
type CopyDirAction ¶
func (*CopyDirAction) Run ¶
func (s *CopyDirAction) Run(ctx TemplateContext) error
type CopyFileAction ¶
func (*CopyFileAction) Run ¶
func (s *CopyFileAction) Run(ctx TemplateContext) error
type CreateFileAction ¶
func (*CreateFileAction) Run ¶
func (s *CreateFileAction) Run(ctx TemplateContext) error
type DeleteFileActionStep ¶
type DeleteFileActionStep struct {
Files []string `yaml:"files"`
}
func (*DeleteFileActionStep) Run ¶
func (s *DeleteFileActionStep) Run(ctx TemplateContext) error
type Deployment ¶
type Development ¶ added in v0.0.32
type ErrRequirementsNotMet ¶ added in v0.0.59
type ErrRequirementsNotMet struct {
Message string
}
func (*ErrRequirementsNotMet) Error ¶ added in v0.0.59
func (e *ErrRequirementsNotMet) Error() string
type LanguageTemplates ¶ added in v0.0.39
type LanguageTemplates []ProjectTemplate
func LoadLanguageTemplates ¶ added in v0.0.39
type ModifyPackageJsonStep ¶
type ModifyPackageJsonStep struct {
Script []nameValue
Main string
Type string
Name string
Version string
Description string
Keywords []string
}
func (*ModifyPackageJsonStep) Run ¶
func (s *ModifyPackageJsonStep) Run(ctx TemplateContext) error
type ModifyTsConfigStep ¶
type ModifyTsConfigStep struct {
Types []string
CompilerOptions []nameValue
}
func (*ModifyTsConfigStep) Run ¶
func (s *ModifyTsConfigStep) Run(ctx TemplateContext) error
type NewAgentSteps ¶
type NewAgentSteps struct {
Steps []any `yaml:"steps"`
}
type NewProjectSteps ¶
type NewProjectSteps struct {
Steps []any `yaml:"steps"`
}
type ProjectTemplate ¶ added in v0.0.39
type Requirement ¶
type Requirement struct {
Command string `yaml:"command"`
Args []string `yaml:"args"`
Version string `yaml:"version"`
Brew string `yaml:"brew"`
URL string `yaml:"url"`
Selfupdate *struct {
Command string `yaml:"command"`
Args []string `yaml:"args"`
} `yaml:"selfupdate"`
}
func (*Requirement) Matches ¶
func (r *Requirement) Matches(ctx TemplateContext) bool
func (*Requirement) TryInstall ¶
func (r *Requirement) TryInstall(ctx TemplateContext) error
type Step ¶
type Step interface {
Run(ctx TemplateContext) error
}
type Template ¶
type Template struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Identifier string `yaml:"identifier"`
Language string `yaml:"language"`
Requirements []Requirement `yaml:"requirements"`
}
func LoadTemplateForRuntime ¶ added in v0.0.113
func (*Template) AddGitHubAction ¶ added in v0.0.74
func (t *Template) AddGitHubAction(ctx TemplateContext) error
func (*Template) Install ¶
func (t *Template) Install(ctx TemplateContext) error
Install installs the requirements for the template
func (*Template) Matches ¶
func (t *Template) Matches(ctx TemplateContext) bool
Matches returns true if the template matches the requirements
func (*Template) NewProject ¶
func (t *Template) NewProject(ctx TemplateContext) (*TemplateRules, []project.AgentConfig, error)
type TemplateContext ¶
type TemplateContext struct {
Context context.Context
Logger logger.Logger
Name string
Description string
AgentName string
AgentDescription string
TemplateDir string
ProjectDir string
Template *Template
TemplateName string
AgentuityCommand string
}
func (*TemplateContext) Interpolate ¶
func (t *TemplateContext) Interpolate(val any) any
type TemplateRules ¶
type TemplateRules struct {
Identifier string `yaml:"identifier"`
Runtime string `yaml:"runtime"`
Language string `yaml:"language"`
Framework string `yaml:"framework"`
SrcDir string `yaml:"src_dir"`
Filename string `yaml:"filename"`
Bundle Bundle `yaml:"bundle"`
Development Development `yaml:"development"`
Deployment Deployment `yaml:"deployment"`
NewProjectSteps NewProjectSteps `yaml:"new_project"`
NewAgentSteps NewAgentSteps `yaml:"new_agent"`
}
func LoadTemplateRuleForIdentifier ¶
func LoadTemplateRuleForIdentifier(templateDir, identifier string) (*TemplateRules, error)
func (*TemplateRules) NewAgent ¶
func (t *TemplateRules) NewAgent(ctx TemplateContext) error
func (*TemplateRules) NewProject ¶
func (t *TemplateRules) NewProject(ctx TemplateContext) error
type Templates ¶
type Templates []Template
func LoadTemplates ¶
LoadTemplates returns all the templates available
func LoadTemplatesFromGithub ¶ added in v0.0.75
LoadTemplatesFromGithub loads the templates from github and returns the templates If the etag is provided, it will be used to check if the templates have changed If the templates have not changed, it will return the templates from the local directory If the templates have changed, it will download the new templates and return them
Click to show internal directories.
Click to hide internal directories.