mifyconfig

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

Functions

func FindWorkspaceConfigPath

func FindWorkspaceConfigPath() (string, error)

func FindWorkspaceConfigPathInLocation

func FindWorkspaceConfigPathInLocation(curDir string) (string, error)

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 PostgresConfig struct {
	Enabled      bool   `yaml:"enabled"`
	DatabaseName string `yaml:"database_name,omitempty"`
}

type ServiceConfig

type ServiceConfig struct {
	Language ServiceLanguage `yaml:"language"`

	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"`
	ProjectName   string   `yaml:"project_name,omitempty"`
	Environments  []string `yaml:"environments"`
}

func ReadWorkspaceConfig

func ReadWorkspaceConfig(path string) (WorkspaceConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL