Documentation
¶
Index ¶
- Constants
- func GetConfigFilePath() string
- func PrintSection(section interface{ ... }, format Format, w io.Writer) (err error)
- func PrintSettings(settings Settings, format Format, w io.Writer) (err error)
- type AuthCredential
- type ClientConfig
- type Format
- type ProjectConfig
- type ServerConfig
- type Settings
- type StoreType
- type UrlConfig
Constants ¶
View Source
const ( DefaultHost = "localhost" DefaultClientPort = 4200 DefaultServerPort = 8989 )
View Source
const ConfigFileName = ".datatug.yaml"
View Source
const FileStoreUrlPrefix = "file:"
Variables ¶
This section is empty.
Functions ¶
func GetConfigFilePath ¶
func GetConfigFilePath() string
func PrintSection ¶
Types ¶
type AuthCredential ¶
type AuthCredential struct {
ID string `json:"ID"` // Like USER or service account ID
Title string `json:"Title,omitempty"`
}
func (AuthCredential) Validate ¶
func (v AuthCredential) Validate() error
type ClientConfig ¶
type ClientConfig struct {
UrlConfig `yaml:",inline"`
}
type ProjectConfig ¶
type ProjectConfig struct {
ID string `yaml:"id"`
Url string `yaml:"url"`
Title string `yaml:"title,omitempty"`
}
ProjectConfig hold project configuration, specifically path to project directory
func (ProjectConfig) Validate ¶
func (v ProjectConfig) Validate() error
type ServerConfig ¶
type ServerConfig struct {
UrlConfig `yaml:",inline"`
}
type Settings ¶
type Settings struct {
Projects []*ProjectConfig `yaml:"projects,omitempty"` // Intentionally do not use map
Client *ClientConfig `yaml:"client,omitempty"`
Server *ServerConfig `yaml:"server,omitempty"`
Credentials map[string][]AuthCredential
}
Settings hold DataTug executable configuration for commands like `serve`
func GetSettings ¶
func (Settings) GetProjectConfig ¶
func (v Settings) GetProjectConfig(projectID string) *ProjectConfig
Click to show internal directories.
Click to hide internal directories.