Documentation ¶
Index ¶
- Constants
- Variables
- func FindWorkspaceConfigPath() (string, error)
- func FindWorkspaceConfigPathInLocation(curDir string) (string, error)
- func SaveServiceConfig(workspaceDir string, serviceName string, conf ServiceConfig) error
- func SaveWorkspaceConfig(path string, conf WorkspaceConfig) error
- type PostgresConfig
- type ServiceConfig
- type ServiceLanguage
- type ServiceOpenAPIClientConfig
- type ServiceOpenAPIConfig
- type WorkspaceConfig
Constants ¶
View Source
const ( WorkspaceConfigName = "workspace.mify.yaml" GoServicesRoot = "go-services" PythonServicesRoot = "py-services" JsServicesRoot = "js-services" )
View Source
const (
ServiceConfigName = "service.mify.yaml"
)
Variables ¶
View Source
var LanguagesList = []ServiceLanguage{ ServiceLanguageGo, ServiceLanguagePython, ServiceLanguageJs, }
Functions ¶
func FindWorkspaceConfigPath ¶
func SaveServiceConfig ¶
func SaveServiceConfig(workspaceDir string, serviceName string, conf ServiceConfig) error
Legacy, try to use Dump instead
func SaveWorkspaceConfig ¶
func SaveWorkspaceConfig(path string, conf WorkspaceConfig) error
Types ¶
type PostgresConfig ¶
type ServiceConfig ¶
type ServiceConfig struct { Language ServiceLanguage `yaml:"language"` Template string `yaml:"template,omitempty"` ServiceName string `yaml:"service_name"` Maintainers []string `yaml:"maintainers"` OpenAPI ServiceOpenAPIConfig `yaml:"openapi,omitempty"` Postgres PostgresConfig `yaml:"postgres,omitempty"` }
func ReadServiceCfg ¶
func ReadServiceCfg(path string) (*ServiceConfig, error)
func ReadServiceConfig ¶
func ReadServiceConfig(workspaceDir string, serviceName string) (ServiceConfig, error)
TODO: remove (use ReadServiceCfg)
func (ServiceConfig) Dump ¶
func (conf ServiceConfig) Dump(path string) error
type ServiceLanguage ¶
type ServiceLanguage string
const ( ServiceLanguageUnknown ServiceLanguage = "unknown" ServiceLanguageGo ServiceLanguage = "go" ServiceLanguagePython ServiceLanguage = "python" ServiceLanguageJs ServiceLanguage = "js" )
type ServiceOpenAPIClientConfig ¶
type ServiceOpenAPIClientConfig struct{}
type ServiceOpenAPIConfig ¶
type ServiceOpenAPIConfig struct {
Clients map[string]ServiceOpenAPIClientConfig `yaml:"clients,omitempty"`
}
func (ServiceOpenAPIConfig) HasClient ¶
func (s ServiceOpenAPIConfig) HasClient(target string) bool
type WorkspaceConfig ¶
type WorkspaceConfig struct { WorkspaceName string `yaml:"workspace_name"` GitHost string `yaml:"git_host"` GitNamespace string `yaml:"git_namespace"` GitRepository string `yaml:"git_repository,omitempty"` OrganizationID string `yaml:"organization_id,omitempty"` ProjectName string `yaml:"project_name,omitempty"` Environments []string `yaml:"environments"` }
func ReadWorkspaceConfig ¶
func ReadWorkspaceConfig(path string) (WorkspaceConfig, error)
Click to show internal directories.
Click to hide internal directories.