Documentation
¶
Index ¶
- Variables
- func DeleteProjects(ctx context.Context, logger logger.Logger, baseUrl string, token string, ...) ([]string, error)
- func ProjectExists(dir string) bool
- func ProjectWithNameExists(ctx context.Context, logger logger.Logger, baseUrl string, token string, ...) (bool, error)
- func RemoveEnvValues(ctx context.Context, logger logger.Logger, dir string, keys ...string) error
- func ResolveProjectDir(logger logger.Logger, cmd *cobra.Command, required bool) string
- func SaveEnvValue(ctx context.Context, logger logger.Logger, dir string, ...) error
- type AgentBundlerConfig
- type AgentConfig
- type Bundler
- type Deployment
- type DeploymentConfig
- type Development
- type InitProjectArgs
- type Project
- func (p *Project) DeleteProjectEnv(ctx context.Context, logger logger.Logger, baseUrl string, token string, ...) error
- func (p *Project) GetProject(ctx context.Context, logger logger.Logger, baseUrl string, token string) (*ProjectData, error)
- func (p *Project) Import(ctx context.Context, logger logger.Logger, baseUrl string, token string, ...) (*ProjectImportResponse, error)
- func (p *Project) Load(dir string) error
- func (p *Project) Save(dir string) error
- func (p *Project) SetProjectEnv(ctx context.Context, logger logger.Logger, baseUrl string, token string, ...) (*ProjectData, error)
- type ProjectContext
- type ProjectData
- type ProjectImportRequest
- type ProjectImportResponse
- type ProjectListData
- type ProjectResponse
- type Resources
- type Response
- type Watch
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrProjectMissingProjectId = errors.New("missing project_id value") )
View Source
var Version string
Functions ¶
func DeleteProjects ¶ added in v0.0.23
func ProjectExists ¶
func ProjectWithNameExists ¶ added in v0.0.23
func RemoveEnvValues ¶ added in v0.0.74
func ResolveProjectDir ¶ added in v0.0.42
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 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
type Development ¶ added in v0.0.23
type Development struct {
Port int `` /* 135-byte string literal not displayed */
Watch Watch `json:"watch" yaml:"watch"`
Command string `json:"command" yaml:"command" hc:"The command to run the development server"`
Args []string `json:"args" yaml:"args" hc:"The arguments to pass to the development server"`
}
type InitProjectArgs ¶
type Project ¶
type Project struct {
Version string `json:"version" yaml:"version" hc:"The version semver range required to run this project"`
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) GetProject ¶ added in v0.0.39
type ProjectContext ¶ added in v0.0.42
type ProjectContext struct {
Logger logger.Logger
Project *Project
Dir string
APIURL string
APPURL string
TransportURL string
Token string
NewProject bool
}
func EnsureProject ¶ added in v0.0.42
func EnsureProject(ctx context.Context, cmd *cobra.Command) ProjectContext
func LoadProject ¶ added in v0.0.42
func TryProject ¶ added in v0.0.74
func TryProject(ctx context.Context, cmd *cobra.Command) ProjectContext
type ProjectData ¶
type ProjectData struct {
APIKey string `json:"api_key"`
ProjectId string `json:"id"`
OrgId string `json:"orgId"`
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(ctx context.Context, 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 ProjectImportRequest ¶ added in v0.0.56
type ProjectImportResponse ¶ added in v0.0.56
type ProjectImportResponse struct {
ID string `json:"id"`
Agents []AgentConfig `json:"agents"`
APIKey string `json:"apiKey"`
IOAuthToken string `json:"ioAuthToken"`
}
type ProjectListData ¶ added in v0.0.23
type ProjectListData struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
OrgId string `json:"orgId"`
OrgName string `json:"orgName"`
}
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.