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) FileEdit(ctx context.Context, explanation, targetFile, search, replace, matchID 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, newConfig *EnvironmentConfig) error
- func (env *Environment) Workdir() *dagger.Directory
- type EnvironmentConfig
- type EnvironmentInfo
- type KVList
- 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 New ¶ added in v0.1.0
func New(ctx context.Context, dag *dagger.Client, id, title string, config *EnvironmentConfig, initialSourceDir *dagger.Directory) (*Environment, error)
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) FileEdit ¶ added in v0.4.1
func (env *Environment) FileEdit(ctx context.Context, explanation, targetFile, search, replace, matchID 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, newConfig *EnvironmentConfig) error
func (*Environment) Workdir ¶
func (env *Environment) Workdir() *dagger.Directory
type EnvironmentConfig ¶ added in v0.0.3
type EnvironmentConfig struct { Workdir string `json:"workdir,omitempty"` BaseImage string `json:"base_image,omitempty"` SetupCommands []string `json:"setup_commands,omitempty"` InstallCommands []string `json:"install_commands,omitempty"` Env KVList `json:"env,omitempty"` Secrets KVList `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) Save ¶ added in v0.0.3
func (config *EnvironmentConfig) Save(baseDir string) error
type EnvironmentInfo ¶ added in v0.1.0
type EnvironmentInfo struct { 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 KVList ¶ added in v0.3.0
type KVList []string
KVList represents a list of key-value pairs in the format KEY=VALUE
func (KVList) Get ¶ added in v0.3.0
Get returns the value for a given key, or empty string if not found
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.