Documentation
¶
Index ¶
- func ProjectExists(dir string) bool
- type Agent
- type Bundler
- type CleanupFunc
- type Deployment
- type DeploymentConfig
- type IO
- type IOResponse
- type InitProjectArgs
- type Project
- func (p *Project) CreateIO(logger logger.Logger, baseUrl string, token string, direction string, io IO) (*IO, error)
- func (p *Project) DeleteIO(logger logger.Logger, baseUrl string, token string, id string) error
- func (p *Project) DeleteProjectEnv(logger logger.Logger, baseUrl string, token string, env []string, ...) error
- func (p *Project) ListIO(logger logger.Logger, baseUrl string, token string, direction string) ([]IO, 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 ProjectResponse
- type Resources
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectExists ¶
Types ¶
type CleanupFunc ¶
type CleanupFunc func()
type Deployment ¶
type Deployment struct {
Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"`
}
type DeploymentConfig ¶
type DeploymentConfig struct {
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"`
Deployment *Deployment `yaml:"deployment,omitempty" json:"deployment,omitempty"`
Bundler *Bundler `yaml:"bundler,omitempty" json:"bundler,omitempty"`
}
func NewDeploymentConfig ¶
func NewDeploymentConfig() *DeploymentConfig
func (*DeploymentConfig) Write ¶
func (c *DeploymentConfig) Write(dir string) (CleanupFunc, error)
type IOResponse ¶
type InitProjectArgs ¶
type Project ¶
type Project struct {
ProjectId string `json:"project_id" yaml:"project_id"`
Deployment *Deployment `json:"deployment,omitempty" yaml:"deployment,omitempty"`
Inputs []IO `json:"inputs,omitempty" yaml:"inputs,omitempty"`
Outputs []IO `json:"outputs,omitempty" yaml:"outputs,omitempty"`
Bundler *Bundler `json:"bundler,omitempty" yaml:"bundler,omitempty"`
}
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"`
IOId string `json:"ioId"`
IOAuthToken string `json:"ioAuthToken,omitempty"`
}
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 ProjectResponse ¶
type ProjectResponse = Response[ProjectData]
type Resources ¶
type Resources struct {
Memory string `json:"memory,omitempty" yaml:"memory,omitempty"`
CPU string `json:"cpu,omitempty" yaml:"cpu,omitempty"`
Disk string `json:"disk,omitempty" yaml:"disk,omitempty"`
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.