Documentation
¶
Overview ¶
Package devconfig reads the developer's own settings for aicoded dev: ports, the apps' environment, personas, the local MySQL server and local values of settings and secrets. The file holds secrets, so only its owner may read it.
Index ¶
Constants ¶
const DefaultPort = 8080
DefaultPort is the dev gateway's port when the workspace sets none.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns the location of dev.yaml in the user's configuration directory.
Types ¶
type AppValues ¶
type AppValues struct {
Settings map[string]string `yaml:"settings"`
Secrets map[string]string `yaml:"secrets"`
}
AppValues are local values for the settings and secrets an app declares.
type Env ¶
type Env string
Env is an environment a workspace's apps can run in.
func (*Env) UnmarshalYAML ¶
UnmarshalYAML accepts only a valid Env.
type Persona ¶
type Persona struct {
Name string `yaml:"name"`
Groups []string `yaml:"groups"`
Roles []string `yaml:"roles"`
}
Persona is a test viewer the dev gateway can sign in as. Its name is the viewer's Subject, so it is 1 to viewer.MaxSubject bytes.
type Workspace ¶
type Workspace struct {
Port int `yaml:"port"`
// Env is the environment the runner tells the apps they run in.
Env Env `yaml:"env"`
// MySQL is the DSN of an admin user of a MySQL 8 server on this machine; it creates the
// apps' databases.
MySQL string `yaml:"mysql"`
Personas []Persona `yaml:"personas"`
Apps map[string]AppValues `yaml:"apps"`
}
Workspace holds the settings for one directory tree of apps.