Documentation
¶
Overview ¶
Package generate creates a workspace (init) and writes its files again from openarch.yaml (render).
Index ¶
Constants ¶
View Source
const ( Create = "create" Update = "update" Unchanged = "unchanged" Delete = "delete" )
File actions.
View Source
const DefaultAdminUser = "admin"
DefaultAdminUser is the OpenArch admin user name.
View Source
const UpstreamAdminPassword = "password"
UpstreamAdminPassword is the password of the users bundled in the OpenArch image.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
// HostMemory returns the memory available to Docker, in bytes.
HostMemory func(ctx context.Context) (int64, error)
Now func() time.Time
}
Env is the access to the system. Tests replace it with fakes.
type FileResult ¶
type FileResult struct {
Path string `json:"path"`
Action string `json:"action"`
// Diff is set by render --dry-run for updated files that hold no secrets.
Diff string `json:"diff,omitempty"`
}
FileResult is what happened, or would happen, to one file.
type InitOptions ¶
type InitOptions struct {
Dir string
Config workspace.Config
// AdminPassword is the new admin password. Empty keeps the password of an
// existing .env.local (with Force) or generates one.
AdminPassword string
Force bool
DryRun bool
}
InitOptions are the inputs of Init.
type RenderOptions ¶
RenderOptions are the inputs of Render.
type Result ¶
type Result struct {
Command string `json:"-"`
Workspace string `json:"workspace"`
DryRun bool `json:"dryRun"`
URL string `json:"url"`
AdminUser string `json:"adminUser"`
PasswordFile string `json:"passwordFile"`
Config workspace.Config `json:"config"`
Sizing workspace.Sizing `json:"sizing"`
Files []FileResult `json:"files"`
Folders []string `json:"folders,omitempty"`
// Context is the name of the CLI context that points to the workspace. init sets it.
Context string `json:"context,omitempty"`
// Warnings go to stderr, never to stdout.
Warnings []string `json:"-"`
}
Result is the outcome of Init or Render.
Click to show internal directories.
Click to hide internal directories.