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 ComponentConfig
- type ComponentsConfig
- type GeneratorParams
- type GeneratorTemplateParams
- 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" MifyGeneratedDirName = "mify-generated" )
View Source
const (
ServiceConfigName = "service.mify.yaml"
)
Variables ¶
View Source
var (
ErrNoSuchService = errors.New("no such service")
)
View Source
var (
ErrWorkspaceNotExists = errors.New("workspace doesn't exists")
)
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 ComponentConfig ¶ added in v0.1.19
type ComponentConfig struct {
Enabled bool `yaml:"enabled,omitempty"`
}
func MakeDefaultComponent ¶ added in v0.1.19
func MakeDefaultComponent() *ComponentConfig
type ComponentsConfig ¶ added in v0.1.19
type ComponentsConfig struct {
Layout *ComponentConfig `yaml:"layout,omitempty"`
}
type GeneratorParams ¶ added in v0.1.19
type GeneratorParams struct {
Template map[ServiceLanguage]GeneratorTemplateParams `yaml:"template,omitempty"`
}
type GeneratorTemplateParams ¶ added in v0.1.19
type GeneratorTemplateParams struct { MifyGeneratedPath string `yaml:"mify_generated_path,omitempty"` MifyGeneratedPackage string `yaml:"mify_generated_package,omitempty"` DevRunner *ComponentConfig `yaml:"dev_runner,omitempty"` }
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"` Components ComponentsConfig `yaml:"components,omitempty"` OpenAPI ServiceOpenAPIConfig `yaml:"openapi,omitempty"` Postgres PostgresConfig `yaml:"postgres,omitempty"` IsExternal bool `yaml:"-"` }
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,omitempty"` GeneratorParams GeneratorParams `yaml:"generator_params,omitempty"` }
func ReadWorkspaceConfig ¶
func ReadWorkspaceConfig(path string) (WorkspaceConfig, error)
Click to show internal directories.
Click to hide internal directories.