Documentation
¶
Index ¶
- 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) FileDelete(ctx context.Context, explanation, targetFile string) error
- func (env *Environment) FileList(ctx context.Context, path string) (string, error)
- func (env *Environment) FileRead(ctx context.Context, targetFile string, shouldReadEntireFile bool, ...) (string, error)
- func (env *Environment) FileWrite(ctx context.Context, explanation, targetFile, contents string) error
- func (env *Environment) Run(ctx context.Context, command, shell string, useEntrypoint bool) (string, error)
- func (env *Environment) RunBackground(ctx context.Context, command, shell string, ports []int, useEntrypoint bool) (EndpointMappings, error)
- func (env *Environment) Terminal(ctx context.Context) error
- func (env *Environment) UpdateConfig(ctx context.Context, explanation string, newConfig *EnvironmentConfig) error
- func (env *Environment) Workdir() *dagger.Directory
- type EnvironmentConfig
- type EnvironmentInfo
- type Notes
- type Service
- type ServiceConfig
- type ServiceConfigs
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointMapping ¶
type EndpointMappings ¶
type EndpointMappings map[int]*EndpointMapping
type Environment ¶
type Environment struct {
*EnvironmentInfo
Services []*Service
Notes Notes
// contains filtered or unexported fields
}
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) FileDelete ¶
func (env *Environment) FileDelete(ctx context.Context, explanation, targetFile string) error
func (*Environment) FileWrite ¶
func (env *Environment) FileWrite(ctx context.Context, explanation, targetFile, contents string) error
func (*Environment) RunBackground ¶
func (env *Environment) RunBackground(ctx context.Context, 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
func (*Environment) Workdir ¶
func (env *Environment) Workdir() *dagger.Directory
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"`
Locked bool
}
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) Save ¶ added in v0.0.3
func (config *EnvironmentConfig) Save(baseDir string) error
type EnvironmentInfo ¶ added in v0.1.0
type EnvironmentInfo struct {
Config *EnvironmentConfig `json:"config,omitempty"`
State *State `json:"state,omitempty"`
ID string `json:"id,omitempty"`
}
EnvironmentInfo contains basic metadata about an environment without requiring dagger operations
func LoadInfo ¶ added in v0.1.0
func LoadInfo(ctx context.Context, id string, state []byte, worktree string) (*EnvironmentInfo, error)
LoadInfo loads basic environment metadata without requiring dagger operations. This is useful for operations that only need access to configuration and state information without the overhead of initializing container operations.
type Notes ¶ added in v0.1.0
type Notes struct {
// contains filtered or unexported fields
}
func (*Notes) AddCommand ¶ added in v0.2.0
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.