Documentation ¶
Overview ¶
Package internal manages the persistent profile configuration of the FTL CLI.
Layout will be something like:
.ftl-project/ project.json profiles/ <profile>/ profile.json [secrets.json] [config.json]
See the design document for more information.
Index ¶
- func Init(project Project) error
- type Profile
- type ProfileType
- type Project
- func (p Project) LoadProfile(name string) (Profile, error)
- func (p *Project) LocalConfigPath(profile string) string
- func (p *Project) LocalSecretsPath(profile string) string
- func (p Project) Profiles() ([]string, error)
- func (p *Project) Save() error
- func (p Project) SaveProfile(profile Profile) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Profile ¶
type Profile struct { Name string `json:"name"` Endpoint string `json:"endpoint"` Type ProfileType `json:"type"` SecretsProvider configuration.ProviderKey `json:"secrets-provider"` ConfigProvider configuration.ProviderKey `json:"config-provider"` }
type ProfileType ¶
type ProfileType string
const ( ProfileTypeLocal ProfileType = "local" ProfileTypeRemote ProfileType = "remote" )
type Project ¶
type Project struct { Realm string `json:"realm"` FTLMinVersion string `json:"ftl-min-version,omitempty"` ModuleRoots []string `json:"module-roots,omitempty"` NoGit bool `json:"no-git,omitempty"` DefaultProfile string `json:"default-profile,omitempty"` Root string `json:"-"` }
func (*Project) LocalConfigPath ¶
LocalConfigPath returns the path to the config file for the given local profile.
func (*Project) LocalSecretsPath ¶
LocalSecretsPath returns the path to the secrets file for the given local profile.
func (Project) SaveProfile ¶
SaveProfile saves a profile to the project.
Click to show internal directories.
Click to hide internal directories.