Documentation
¶
Index ¶
- type ProjectResource
- func (p *ProjectResource) Create(ctx *agentcli.AppContext, slug string, opts map[string]string) (*resource.Record, error)
- func (p *ProjectResource) Get(_ *agentcli.AppContext, id string) (*resource.Record, error)
- func (p *ProjectResource) List(_ *agentcli.AppContext, _ resource.Filter) ([]resource.Record, error)
- func (p *ProjectResource) Schema() resource.ResourceSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectResource ¶
type ProjectResource struct {
// contains filtered or unexported fields
}
ProjectResource implements the Resource interface for scaffolding new Go CLI projects. It is a degenerate resource: only Create is meaningful. List returns an empty slice and Get returns an error.
func New ¶
func New(fs dal.FileSystem, exec dal.Executor) *ProjectResource
New creates a ProjectResource with the given filesystem and executor.
func (*ProjectResource) Create ¶
func (p *ProjectResource) Create(ctx *agentcli.AppContext, slug string, opts map[string]string) (*resource.Record, error)
Create scaffolds a new Go CLI project directory. slug is the project name. opts can contain "module", "mode", and "base_dir".
func (*ProjectResource) Get ¶
func (p *ProjectResource) Get(_ *agentcli.AppContext, id string) (*resource.Record, error)
Get returns an error. Individual project lookup is not supported.
func (*ProjectResource) List ¶
func (p *ProjectResource) List(_ *agentcli.AppContext, _ resource.Filter) ([]resource.Record, error)
List returns an empty slice. Projects are not tracked after creation.
func (*ProjectResource) Schema ¶
func (p *ProjectResource) Schema() resource.ResourceSchema
Schema returns the resource schema for projects.
Click to show internal directories.
Click to hide internal directories.