Documentation
¶
Index ¶
- func Initialize(client *dagger.Client) error
- func InitializeLocalRemote(ctx context.Context, localRepoPath string) (string, error)
- func List(ctx context.Context, source string) ([]string, error)
- type EndpointMapping
- type EndpointMappings
- type Environment
- func (env *Environment) AddService(ctx context.Context, explanation string, cfg *ServiceConfig) (*Service, error)
- func (env *Environment) Checkpoint(ctx context.Context, target string) (string, error)
- func (env *Environment) Delete(ctx context.Context) error
- func (env *Environment) DeleteLocalRemoteBranch() error
- func (env *Environment) DeleteWorktree() error
- func (s *Environment) Download(ctx context.Context, source string, target string) error
- func (s *Environment) FileDelete(ctx context.Context, explanation, targetFile string) error
- func (s *Environment) FileList(ctx context.Context, path string) (string, error)
- func (s *Environment) FileRead(ctx context.Context, targetFile string, shouldReadEntireFile bool, ...) (string, error)
- func (s *Environment) FileWrite(ctx context.Context, explanation, targetFile, contents string) error
- func (env *Environment) Fork(ctx context.Context, explanation, name string, version *Version) (*Environment, error)
- func (env *Environment) GetWorktreePath() (string, error)
- func (env *Environment) InitializeWorktree(ctx context.Context, localRepoPath string) (string, error)
- func (s *Environment) RemoteDiff(ctx context.Context, source string, target string) (string, error)
- func (env *Environment) Revert(ctx context.Context, explanation string, version Version) error
- func (s *Environment) RevisionDiff(ctx context.Context, path string, fromVersion, toVersion Version) (string, error)
- func (env *Environment) Run(ctx context.Context, explanation, command, shell string, useEntrypoint bool) (string, error)
- func (env *Environment) RunBackground(ctx context.Context, explanation, command, shell string, ports []int, ...) (EndpointMappings, error)
- func (env *Environment) SetEnv(ctx context.Context, explanation string, envs []string) error
- func (env *Environment) Terminal(ctx context.Context) error
- func (env *Environment) UpdateConfig(ctx context.Context, explanation string, newConfig *EnvironmentConfig) error
- func (s *Environment) Upload(ctx context.Context, explanation, source string, target string) error
- type EnvironmentConfig
- type History
- type Revision
- type Service
- type ServiceConfig
- type ServiceConfigs
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func InitializeLocalRemote ¶
Types ¶
type EndpointMapping ¶
type EndpointMappings ¶
type EndpointMappings map[int]*EndpointMapping
type Environment ¶
type Environment struct {
Config *EnvironmentConfig
ID string
Name string
Source string
Worktree string
Services []*Service
History History
// contains filtered or unexported fields
}
func Create ¶
func Create(ctx context.Context, explanation, source, name string) (*Environment, error)
func Get ¶
func Get(idOrName string) *Environment
func (*Environment) AddService ¶ added in v0.0.3
func (env *Environment) AddService(ctx context.Context, explanation string, cfg *ServiceConfig) (*Service, error)
func (*Environment) Checkpoint ¶
func (*Environment) DeleteLocalRemoteBranch ¶
func (env *Environment) DeleteLocalRemoteBranch() error
func (*Environment) DeleteWorktree ¶
func (env *Environment) DeleteWorktree() error
func (*Environment) FileDelete ¶
func (s *Environment) FileDelete(ctx context.Context, explanation, targetFile string) error
func (*Environment) FileWrite ¶
func (s *Environment) FileWrite(ctx context.Context, explanation, targetFile, contents string) error
func (*Environment) Fork ¶
func (env *Environment) Fork(ctx context.Context, explanation, name string, version *Version) (*Environment, error)
func (*Environment) GetWorktreePath ¶
func (env *Environment) GetWorktreePath() (string, error)
func (*Environment) InitializeWorktree ¶
func (*Environment) RemoteDiff ¶
func (*Environment) RevisionDiff ¶
func (*Environment) RunBackground ¶
func (env *Environment) RunBackground(ctx context.Context, explanation, command, shell string, ports []int, useEntrypoint bool) (EndpointMappings, error)
func (*Environment) UpdateConfig ¶ added in v0.0.3
func (env *Environment) UpdateConfig(ctx context.Context, explanation string, newConfig *EnvironmentConfig) error
type EnvironmentConfig ¶ added in v0.0.3
type EnvironmentConfig struct {
Instructions string `json:"-"`
Workdir string `json:"workdir,omitempty"`
BaseImage string `json:"base_image,omitempty"`
SetupCommands []string `json:"setup_commands,omitempty"`
Env []string `json:"env,omitempty"`
Secrets []string `json:"secrets,omitempty"`
Services ServiceConfigs `json:"services,omitempty"`
}
func DefaultConfig ¶ added in v0.0.3
func DefaultConfig() *EnvironmentConfig
func (*EnvironmentConfig) Copy ¶ added in v0.0.3
func (config *EnvironmentConfig) Copy() *EnvironmentConfig
func (*EnvironmentConfig) Load ¶ added in v0.0.3
func (config *EnvironmentConfig) Load(baseDir string) error
func (*EnvironmentConfig) Locked ¶ added in v0.0.3
func (config *EnvironmentConfig) Locked(baseDir string) bool
func (*EnvironmentConfig) Save ¶ added in v0.0.3
func (config *EnvironmentConfig) Save(baseDir string) error
type Service ¶ added in v0.0.3
type Service struct {
Config *ServiceConfig `json:"config"`
Endpoints EndpointMappings `json:"endpoints"`
// contains filtered or unexported fields
}
type ServiceConfig ¶ added in v0.0.3
type ServiceConfigs ¶ added in v0.0.3
type ServiceConfigs []*ServiceConfig
func (ServiceConfigs) Get ¶ added in v0.0.3
func (sc ServiceConfigs) Get(name string) *ServiceConfig
Click to show internal directories.
Click to hide internal directories.