Documentation
¶
Index ¶
- func DeleteProjects(logger logger.Logger, baseUrl string, token string, ids []string) ([]string, error)
- func ProjectExists(dir string) bool
- func ProjectWithNameExists(logger logger.Logger, baseUrl string, token string, name string) (bool, error)
- type AgentBundlerConfig
- type AgentConfig
- type Bundler
- type CleanupFunc
- type Deployment
- type DeploymentConfig
- type Development
- type InitProjectArgs
- type Project
- func (p *Project) DeleteProjectEnv(logger logger.Logger, baseUrl string, token string, env []string, ...) error
- func (p *Project) ListProjectEnv(logger logger.Logger, baseUrl string, token string) (*ProjectData, error)
- func (p *Project) Load(dir string) error
- func (p *Project) Save(dir string) error
- func (p *Project) SetProjectEnv(logger logger.Logger, baseUrl string, token string, env map[string]string, ...) (*ProjectData, error)
- type ProjectData
- type ProjectListData
- type ProjectResponse
- type Resources
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteProjects ¶ added in v0.0.23
func ProjectExists ¶
Types ¶
type AgentBundlerConfig ¶ added in v0.0.23
type AgentBundlerConfig struct {
Dir string `yaml:"dir" json:"dir"`
}
type AgentConfig ¶ added in v0.0.23
type AgentConfig struct {
ID string `json:"id" yaml:"id" hc:"The ID of the Agent which is automatically generated"`
Name string `json:"name" yaml:"name" hc:"The name of the Agent which is editable"`
Description string `json:"description,omitempty" yaml:"description,omitempty" hc:"The description of the Agent which is editable"`
}
type Bundler ¶ added in v0.0.17
type Bundler struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Identifier string `yaml:"identifier" json:"identifier"`
Language string `yaml:"language" json:"language"`
Framework string `yaml:"framework,omitempty" json:"framework,omitempty"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
AgentConfig AgentBundlerConfig `yaml:"agents" json:"agents"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
CLIVersion string `yaml:"-" json:"-"`
}
type CleanupFunc ¶
type CleanupFunc func()
type Deployment ¶
type DeploymentConfig ¶
type DeploymentConfig struct {
Provider string `yaml:"provider" json:"provider"`
Language string `yaml:"language" json:"language"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
MinVersion string `yaml:"min_version,omitempty" json:"min_version,omitempty"` // FIXME
WorkingDir string `yaml:"working_dir,omitempty" json:"working_dir,omitempty"`
Command []string `yaml:"command,omitempty" json:"command,omitempty"`
Env []string `yaml:"env,omitempty" json:"env,omitempty"`
}
func NewDeploymentConfig ¶
func NewDeploymentConfig() *DeploymentConfig
func (*DeploymentConfig) Write ¶
func (c *DeploymentConfig) Write(logger logger.Logger, dir string) (CleanupFunc, error)
type Development ¶ added in v0.0.23
type InitProjectArgs ¶
type Project ¶
type Project struct {
ProjectId string `json:"project_id" yaml:"project_id" hc:"The ID of the project which is automatically generated"`
Name string `json:"name" yaml:"name" hc:"The name of the project which is editable"`
Description string `json:"description" yaml:"description" hc:"The description of the project which is editable"`
Development *Development `json:"development,omitempty" yaml:"development,omitempty" hc:"The development configuration for the project"`
Deployment *Deployment `json:"deployment,omitempty" yaml:"deployment,omitempty"`
Bundler *Bundler `json:"bundler,omitempty" yaml:"bundler,omitempty" hc:"You should not need to change these value"`
Agents []AgentConfig `json:"agents" yaml:"agents" hc:"The agents that are part of this project"`
}
func (*Project) DeleteProjectEnv ¶
func (*Project) ListProjectEnv ¶
type ProjectData ¶
type ProjectData struct {
APIKey string `json:"api_key"`
ProjectId string `json:"id"`
Env map[string]string `json:"env"`
Secrets map[string]string `json:"secrets"`
WebhookAuthToken string `json:"webhookAuthToken,omitempty"`
AgentID string `json:"agentId"`
}
func InitProject ¶
func InitProject(logger logger.Logger, args InitProjectArgs) (*ProjectData, error)
InitProject will create a new project in the organization. It will return the API key and project ID if the project is initialized successfully.
type ProjectListData ¶ added in v0.0.23
type ProjectListData struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
}
func ListProjects ¶ added in v0.0.23
type ProjectResponse ¶
type ProjectResponse = Response[ProjectData]
type Resources ¶
type Resources struct {
Memory string `json:"memory,omitempty" yaml:"memory,omitempty" hc:"The memory requirements"`
CPU string `json:"cpu,omitempty" yaml:"cpu,omitempty" hc:"The CPU requirements"`
Disk string `json:"disk,omitempty" yaml:"disk,omitempty" hc:"The disk size requirements"`
CPUQuantity resource.Quantity `json:"-" yaml:"-"`
MemoryQuantity resource.Quantity `json:"-" yaml:"-"`
DiskQuantity resource.Quantity `json:"-" yaml:"-"`
}
Click to show internal directories.
Click to hide internal directories.