commands

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdBuildUse   = "build"
	CmdBuildShort = "build atomika project"
)
View Source
const (
	CmdDoctorUse   = "doctor"
	CmdDoctorShort = "check for dependencies"
)
View Source
const (
	CmdProjectUse   = "project"
	CmdProjectShort = "project management"
)
View Source
const (
	CmdProjectCreateUse   = "create NAME [--repo-url=<url>] [--srv-path=<rel-path>]"
	CmdProjectCreateShort = "create a new project"
)
View Source
const (
	CmdProjectGenerateUse   = "generate"
	CmdProjectGenerateShort = "generate project definitions"
)
View Source
const (
	CmdRunUse   = "run"
	CmdRunShort = "run the current project"
)
View Source
const (
	CmdServiceUse   = "service"
	CmdServiceShort = "service management"
)
View Source
const (
	CmdServiceCreateUse   = "create NAME"
	CmdServiceCreateShort = "create a new service"
)
View Source
const (
	CmdServiceGenerateUse   = "generate NAME [--sdk-go] [--sdk-js] [--sdk-ts]"
	CmdServiceGenerateShort = "generate files for service"
)
View Source
const (
	CmdVersionUse   = "version"
	CmdVersionShort = "output version"
)

Variables

View Source
var (
	CmdBuildAlias []string
	FArch         = "amd64"
	FOS           = "linux"
	FBuildPath    = ""
)
View Source
var (
	ErrCwd           = errors.New("cannot cwd")
	ErrCreateDir     = errors.New("cannot create dir")
	ErrDirExist      = errors.New("dir already exists")
	ErrFileExist     = errors.New("dir already exists")
	ErrParseTemplate = errors.New("cannot parse template")
	ErrGitRepoNA     = errors.New("git URL not provided")

	ErrMetaValueType = errors.New("type of the value is not correct")
)
View Source
var (
	FProjectCreateRepoURL     string
	FProjectCreateServicePath string
)
View Source
var (
	CmdProjectGenerateAlias   = []string{"g", "gen"}
	FProjectGenerateWithGoSDK = false
	FProjectGenerateWithJSSDK = false
	FProjectGenerateWithTSSDK = false
)
View Source
var (
	CmdRunAlias []string
	FRunPath    = ""
)
View Source
var (
	CmdServiceGenerateAlias   = []string{"gen"}
	FServiceGenerateWithGoSDK = false
	FServiceGenerateWithJSSDK = false
	FServiceGenerateWithTSSDK = false
)
View Source
var CmdAtomika *cobra.Command
View Source
var CmdDoctorAlias = []string{"doc"}
View Source
var CmdProjectAlias = []string{"p", "proj"}
View Source
var CmdProjectCreateAlias []string
View Source
var CmdServiceAlias []string
View Source
var CmdServiceCreateAlias = []string{"c"}
View Source
var CmdVersionAlias = []string{"v", "ver"}

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	CobCmd() *cobra.Command
}

type Command

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

func New

func New(di DI) *Command

func (*Command) Execute

func (c *Command) Execute(args []string) Response

type DI

type DI struct {
	AtomikaFS fs.FS
	Version   string
}

type Execute

type Execute func(cmd *cobra.Command, args []string) error

type Response

type Response struct {
	Result string
	Err    error
	Cmd    *cobra.Command
}

Jump to

Keyboard shortcuts

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