Documentation
¶
Index ¶
- Variables
- func GetProjectFilename(dir string) string
- func ProjectExists(dir string) bool
- func SafeProjectFilename(name string, isPython bool) string
- type AgentBundlerConfig
- type AgentConfig
- type AuthenticationType
- type Bundler
- type Deployment
- type DeploymentConfig
- type Development
- type Mode
- type Project
- type Resources
- type TriggerDirection
- type TriggerType
- type Watch
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrProjectMissingProjectId = errors.New("missing project_id value") )
Functions ¶
func GetProjectFilename ¶ added in v1.0.98
GetProjectFilename returns the filename for a project.
func ProjectExists ¶ added in v1.0.98
ProjectExists returns true if a project exists in the given directory.
func SafeProjectFilename ¶ added in v1.0.98
SafeProjectFilename returns a safe filename for a project.
Types ¶
type AgentBundlerConfig ¶
type AgentBundlerConfig struct {
Dir string `yaml:"dir" json:"dir"`
}
type AgentConfig ¶
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 AuthenticationType ¶
type AuthenticationType string
const ( AuthenticationTypeProject AuthenticationType = "project" AuthenticationTypeBearer AuthenticationType = "bearer" AuthenticationTypeBasic AuthenticationType = "basic" AuthenticationTypeHeader AuthenticationType = "header" )
type Bundler ¶
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 Deployment struct {
Command string `json:"command" yaml:"command"`
Args []string `json:"args" yaml:"args"`
Resources *Resources `json:"resources" yaml:"resources" hc:"You should tune the resources for the deployment"`
Mode *Mode `json:"mode,omitempty" yaml:"mode,omitempty" hc:"The deployment mode"`
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty" hc:"The dependencies to install before running the deployment"`
DomainNames []string `yaml:"domains,omitempty" json:"domains,omitempty"`
}
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"`
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"`
}
type Development ¶
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 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) IsJavaScript ¶ added in v1.0.98
IsJavaScript returns true if the project is a JavaScript project.
func (*Project) IsPython ¶ added in v1.0.98
IsPython returns true if the project is a Python project.
func (*Project) Load ¶ added in v1.0.98
Load will load the project from a file in the given directory.
func (*Project) SafeFilename ¶ added in v1.0.98
SafeFilename returns a safe filename for the project.
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:"-"`
}
func (*Resources) UnmarshalJSON ¶
type TriggerDirection ¶
type TriggerDirection string
const ( TriggerDirectionSource TriggerDirection = "source" TriggerDirectionDestination TriggerDirection = "destination" )
type TriggerType ¶
type TriggerType string
const ( TriggerTypeAPI TriggerType = "api" TriggerTypeWebhook TriggerType = "webhook" TriggerTypeCron TriggerType = "cron" TriggerTypeManual TriggerType = "manual" TriggerTypeAgent TriggerType = "agent" TriggerTypeSMS TriggerType = "sms" TriggerTypeEmail TriggerType = "email" )
Click to show internal directories.
Click to hide internal directories.