workspace

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiGatewayName     = "api-gateway"
	MainApiSchemaName  = "api.yaml"
	MifySchemaName     = "service.mify.yaml"
	CloudSchemaName    = "cloud.mify.yaml"
	GoServicesDirName  = "go-services"
	DevRunnerName      = "dev-runner"
	TmpSubdir          = "services"
	ExternalSchemasDir = "mify-external"
)

Variables

View Source
var (
	ErrUnsupportedLanguage = errors.New("unknown or unsupported language")
	ErrNoSuchService       = errors.New("no such service")
)

Functions

This section is empty.

Types

type Description

type Description struct {
	Name        string
	BasePath    string
	GoRoot      string // Path to go-services
	Config      mifyconfig.WorkspaceConfig
	TplHeader   string
	TplHeaderPy string
}

func InitDescription

func InitDescription(workspacePath string) (Description, error)

func InitDescriptionFromConfig added in v0.1.19

func InitDescriptionFromConfig(workspacePath string, conf mifyconfig.WorkspaceConfig) (Description, error)

func (Description) GetAllApps

func (c Description) GetAllApps() []string

func (Description) GetApiSchemaAbsPath

func (c Description) GetApiSchemaAbsPath(serviceName string, schemaName string) string

func (Description) GetApiSchemaDirAbsPath

func (c Description) GetApiSchemaDirAbsPath(serviceName string) string

func (Description) GetApiSchemaDirRelPath

func (c Description) GetApiSchemaDirRelPath(serviceName string) string

func (Description) GetApiSchemaGenAbsPath

func (c Description) GetApiSchemaGenAbsPath(serviceName string) string

Abs path to api_generated.yaml

func (Description) GetApiServices

func (c Description) GetApiServices() []string

func (Description) GetAppIncludePath

func (c Description) GetAppIncludePath(serviceName string) string

Path to include 'app' package

func (*Description) GetAppRelPath

func (c *Description) GetAppRelPath(serviceName string) string

func (*Description) GetAppSubAbsPath

func (c *Description) GetAppSubAbsPath(serviceName string, fileName string) string

func (*Description) GetAppSubRelPath

func (c *Description) GetAppSubRelPath(serviceName string, fileName string) string

User app

func (*Description) GetCacheDirectory

func (c *Description) GetCacheDirectory() string

func (Description) GetCloudSchemaAbsPath

func (c Description) GetCloudSchemaAbsPath(serviceName string) string

func (Description) GetCloudSchemaRelPath

func (c Description) GetCloudSchemaRelPath(serviceName string) string

func (*Description) GetCmdAbsPath

func (c *Description) GetCmdAbsPath(serviceName string) string

func (*Description) GetCmdRelPath

func (c *Description) GetCmdRelPath(serviceName string) string

func (*Description) GetCoreIncludePath

func (c *Description) GetCoreIncludePath(serviceName string) string

Path to include 'core' package

func (*Description) GetDevRunnerAbsPath

func (c *Description) GetDevRunnerAbsPath() string

func (*Description) GetDevRunnerMainAbsPath

func (c *Description) GetDevRunnerMainAbsPath() string

func (*Description) GetDevRunnerMainRelPath

func (c *Description) GetDevRunnerMainRelPath() string

func (*Description) GetDevRunnerRelPath

func (c *Description) GetDevRunnerRelPath() string

func (*Description) GetDockerfileAbsPath

func (c *Description) GetDockerfileAbsPath(serviceName string, lang mifyconfig.ServiceLanguage) (string, error)

func (Description) GetExternalApiSchemaAbsPath added in v0.1.18

func (c Description) GetExternalApiSchemaAbsPath(serviceName string, schemaName string) string

func (Description) GetExternalApiSchemaDirAbsPath added in v0.1.18

func (c Description) GetExternalApiSchemaDirAbsPath(serviceName string) string

func (Description) GetExternalApiSchemaDirRelPath added in v0.1.18

func (c Description) GetExternalApiSchemaDirRelPath(serviceName string) string

func (Description) GetExternalSchemasAbsPath added in v0.1.18

func (c Description) GetExternalSchemasAbsPath(serviceName string) string

func (Description) GetExternalSchemasRelPath added in v0.1.18

func (c Description) GetExternalSchemasRelPath(serviceName string) string

func (Description) GetExternalSchemasRootAbsPath added in v0.1.18

func (c Description) GetExternalSchemasRootAbsPath() string

func (Description) GetExternalSchemasRootRelPath added in v0.1.18

func (c Description) GetExternalSchemasRootRelPath() string

func (Description) GetFrontendServices

func (c Description) GetFrontendServices() ([]string, error)

func (*Description) GetGeneratedAbsPath

func (c *Description) GetGeneratedAbsPath(serviceName string) string

func (*Description) GetGeneratedAppPath

func (c *Description) GetGeneratedAppPath(serviceName string) string

func (*Description) GetGeneratedAppRelPath

func (c *Description) GetGeneratedAppRelPath(serviceName string) string

func (*Description) GetGeneratedRelPath

func (c *Description) GetGeneratedRelPath(serviceName string) string

func (Description) GetGoConfigsImportPath

func (c Description) GetGoConfigsImportPath() string

func (*Description) GetGoModAbsPath

func (c *Description) GetGoModAbsPath() string

func (*Description) GetGoModRelPath

func (c *Description) GetGoModRelPath() string

func (Description) GetGoModule

func (c Description) GetGoModule() string

func (*Description) GetGoServiceGeneratedCoreRelPath

func (c *Description) GetGoServiceGeneratedCoreRelPath(serviceName string) string

func (*Description) GetGoServicesAbsPath

func (c *Description) GetGoServicesAbsPath() string

func (*Description) GetGoServicesRelPath

func (c *Description) GetGoServicesRelPath() string

func (*Description) GetGoSumAbsPath

func (c *Description) GetGoSumAbsPath() string

func (*Description) GetGoSumRelPath

func (c *Description) GetGoSumRelPath() string

func (*Description) GetJsComponentsAbsPath

func (c *Description) GetJsComponentsAbsPath(serviceName string) string

func (*Description) GetJsComponentsRelPath

func (c *Description) GetJsComponentsRelPath(serviceName string) string

func (*Description) GetJsDockerfileAbsPath

func (c *Description) GetJsDockerfileAbsPath(serviceName string) string

func (*Description) GetJsDockerfileRelPath

func (c *Description) GetJsDockerfileRelPath(serviceName string) string

func (*Description) GetJsGeneratedAbsPath

func (c *Description) GetJsGeneratedAbsPath(serviceName string, template string) string

func (*Description) GetJsGeneratedRelPath

func (c *Description) GetJsGeneratedRelPath(serviceName string, template string) string

func (*Description) GetJsIndexAbsPath

func (c *Description) GetJsIndexAbsPath(serviceName string) string

func (*Description) GetJsIndexRelPath

func (c *Description) GetJsIndexRelPath(serviceName string) string

func (*Description) GetJsPackageJsonAbsPath

func (c *Description) GetJsPackageJsonAbsPath() string

func (*Description) GetJsPackageJsonRelPath

func (c *Description) GetJsPackageJsonRelPath() string

func (*Description) GetJsPagesAbsPath

func (c *Description) GetJsPagesAbsPath(serviceName string) string

func (*Description) GetJsPagesRelPath

func (c *Description) GetJsPagesRelPath(serviceName string) string

func (*Description) GetJsSampleVueAbsPath

func (c *Description) GetJsSampleVueAbsPath(serviceName string) string

func (*Description) GetJsSampleVueRelPath

func (c *Description) GetJsSampleVueRelPath(serviceName string) string

func (*Description) GetJsServiceAbsPath

func (c *Description) GetJsServiceAbsPath(serviceName string) string

func (*Description) GetJsServiceNuxtConfigAbsPath

func (c *Description) GetJsServiceNuxtConfigAbsPath(serviceName string) string

func (*Description) GetJsServiceNuxtConfigRelPath

func (c *Description) GetJsServiceNuxtConfigRelPath(serviceName string) string

func (*Description) GetJsServicePackageJsonAbsPath

func (c *Description) GetJsServicePackageJsonAbsPath(serviceName string) string

func (*Description) GetJsServicePackageJsonRelPath

func (c *Description) GetJsServicePackageJsonRelPath(serviceName string) string

func (*Description) GetJsServiceRelPath

func (c *Description) GetJsServiceRelPath(serviceName string) string

func (*Description) GetJsServiceRootAbs added in v0.1.15

func (c *Description) GetJsServiceRootAbs(serviceName string) string

func (*Description) GetJsServiceRootRel added in v0.1.15

func (c *Description) GetJsServiceRootRel(serviceName string) string

func (*Description) GetJsServiceYarnLockAbsPath

func (c *Description) GetJsServiceYarnLockAbsPath(serviceName string) string

func (*Description) GetJsServiceYarnLockRelPath

func (c *Description) GetJsServiceYarnLockRelPath(serviceName string) string

func (*Description) GetJsServicesAbsPath

func (c *Description) GetJsServicesAbsPath() string

func (*Description) GetJsServicesPath

func (c *Description) GetJsServicesPath() string

func (*Description) GetJsServicesRelPath

func (c *Description) GetJsServicesRelPath() string

func (*Description) GetLogsDirectory

func (c *Description) GetLogsDirectory() string

func (Description) GetMifyGenerated added in v0.1.19

func (c Description) GetMifyGenerated(serviceConfig *mifyconfig.ServiceConfig) MifyGenerated

func (Description) GetMifySchemaAbsPath

func (c Description) GetMifySchemaAbsPath(serviceName string) string

func (Description) GetMifySchemaRelPath

func (c Description) GetMifySchemaRelPath(serviceName string) string

func (*Description) GetMigrationsDirectory

func (c *Description) GetMigrationsDirectory(databaseName string, lang mifyconfig.ServiceLanguage) (string, error)

func (*Description) GetPythonAppRelPath

func (c *Description) GetPythonAppRelPath(serviceName string) string

func (*Description) GetPythonAppSubAbsPath

func (c *Description) GetPythonAppSubAbsPath(serviceName string, fileName string) string

func (*Description) GetPythonAppSubRelPath

func (c *Description) GetPythonAppSubRelPath(serviceName string, fileName string) string

func (*Description) GetPythonServiceSubAbsPath

func (c *Description) GetPythonServiceSubAbsPath(serviceName string, filename string) string

func (*Description) GetPythonServicesAbsPath

func (c *Description) GetPythonServicesAbsPath() string

func (*Description) GetPythonServicesRelPath

func (c *Description) GetPythonServicesRelPath() string

func (*Description) GetRepository

func (c *Description) GetRepository() string

func (Description) GetSchemasAbsPath

func (c Description) GetSchemasAbsPath(serviceName string) string

func (Description) GetSchemasRelPath

func (c Description) GetSchemasRelPath(serviceName string) string

func (Description) GetSchemasRootAbsPath

func (c Description) GetSchemasRootAbsPath() string

func (Description) GetSchemasRootRelPath

func (c Description) GetSchemasRootRelPath() string

func (*Description) GetServiceCacheDirectory

func (c *Description) GetServiceCacheDirectory(serviceName string) string

func (*Description) GetServiceDirectoryRelPath added in v0.1.4

func (c *Description) GetServiceDirectoryRelPath(serviceName string, language mifyconfig.ServiceLanguage, template string) (string, error)

func (*Description) GetServiceGeneratedAPIRelPath

func (c *Description) GetServiceGeneratedAPIRelPath(serviceName string, language mifyconfig.ServiceLanguage) (string, error)

func (Description) GetServiceList

func (description Description) GetServiceList() ([]string, error)

func (*Description) GetServicesAbsPath

func (c *Description) GetServicesAbsPath(lang mifyconfig.ServiceLanguage) (string, error)

func (*Description) GetSqlQueriesDirectory added in v0.1.11

func (c *Description) GetSqlQueriesDirectory(databaseName string, lang mifyconfig.ServiceLanguage) (string, error)

func (*Description) GetStatsQueueFile added in v0.1.7

func (c *Description) GetStatsQueueFile() string

func (Description) GetUniversalApiSchemaAbsPath added in v0.1.18

func (c Description) GetUniversalApiSchemaAbsPath(serviceName string, schemaName string) (string, error)

func (Description) GetUniversalApiSchemaDirRelPath added in v0.1.18

func (c Description) GetUniversalApiSchemaDirRelPath(serviceName string) (string, error)

func (*Description) HasApi

func (c *Description) HasApi(serviceName string) bool

func (Description) HasService

func (c Description) HasService(serviceName string) bool

type GoService

type GoService struct {
	Name string
}

func (GoService) GetSafeName

func (c GoService) GetSafeName() string

Name which can be used in generated go code

type MifyGenerated added in v0.1.19

type MifyGenerated struct {
	// contains filtered or unexported fields
}

func (MifyGenerated) GetCommonPackage added in v0.1.19

func (c MifyGenerated) GetCommonPackage() string

func (MifyGenerated) GetCommonPath added in v0.1.19

func (c MifyGenerated) GetCommonPath() Path

func (MifyGenerated) GetPackage added in v0.1.19

func (c MifyGenerated) GetPackage() string

func (MifyGenerated) GetPath added in v0.1.19

func (c MifyGenerated) GetPath() Path

func (MifyGenerated) GetServicePackage added in v0.1.19

func (c MifyGenerated) GetServicePackage() string

func (MifyGenerated) GetServicePath added in v0.1.19

func (c MifyGenerated) GetServicePath() Path

type Path added in v0.1.19

type Path struct {
	// contains filtered or unexported fields
}

func NewPath added in v0.1.19

func NewPath(c Description, relPath string) Path

func (Path) Abs added in v0.1.19

func (p Path) Abs() string

func (Path) Rel added in v0.1.19

func (p Path) Rel() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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