meta

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CmdUpdate    = "update"
	CmdNew       = "new"
	CmdModel     = "model"
	CmdClient    = "client"
	CmdClientSet = "clientset"
)

cft Commands

View Source
const (
	IdlThrift = "thrift"
	IdlProto  = "proto"
)

cft IDLs

View Source
const (
	TpCompilerThrift = "thriftgo"
	TpCompilerProto  = "protoc"
)

Third-party Compilers

View Source
const (
	ProtocPluginName = "protoc-gen-crafter"
	ThriftPluginName = "thrift-gen-crafter"
)

cft Plugins

View Source
const (
	LoadError           = 1
	GenerateLayoutError = 2
	PersistError        = 3
	PluginError         = 4
)

cft Errors

View Source
const (
	ModelDir   = "biz/model"
	RouterDir  = "biz/router"
	HandlerDir = "biz/handler"
)

Package Dir

View Source
const AddThriftReplace = "do not generate 'go.mod', please add 'replace github.com/apache/thrift => github.com/apache/thrift v0.13.0' to your 'go.mod'"
View Source
const DefaultServiceName = "crafter_service"
View Source
const EnvPluginMode = "CRAFTER_PLUGIN_MODE"
View Source
const ManifestFile = ".cft"
View Source
const (
	SetBodyParam = "SetBodyParam(req).\n"
)

template const value

View Source
const SysType = runtime.GOOS

SysType is the running program's operating system type

View Source
const TheUseOptionMessage = "'model code' is not generated due to the '-use' option"

TheUseOptionMessage indicates that the generating of 'model code' is aborted due to the -use option for thrift IDL.

View Source
const Version = "v0.0.1"

Version cft version

View Source
const WindowsOS = "windows"

Variables

View Source
var GoVersion *gv.Version

Functions

This section is empty.

Types

type Backend

type Backend string

Backend Model Backends

const (
	BackendGolang Backend = "golang"
	BackendJava   Backend = "java"
	BackendPython Backend = "python"
	BackendRuby   Backend = "ruby"
	BackendRust   Backend = "rust"
)

type GeneratedJSON

type GeneratedJSON struct {
	ServiceGroup string   `json:"serviceGroup"`
	Module       string   `json:"module"`
	Clients      []string `json:"clients"`
}

func LoadGeneratedJson

func LoadGeneratedJson(filename string, generatedJson *GeneratedJSON) (*GeneratedJSON, error)

type Manifest

type Manifest struct {
	Version    string `yaml:"cftVersion"`
	HandlerDir string `yaml:"handlerDir"`
	ModelDir   string `yaml:"modelDir"`
	RouterDir  string `yaml:"routerDir"`
}

func (*Manifest) InitAndValidate

func (manifest *Manifest) InitAndValidate(dir string) error

func (*Manifest) Persist

func (manifest *Manifest) Persist(dir string) error

func (*Manifest) String

func (manifest *Manifest) String() string

type Mode

type Mode int

Mode cft run modes

Jump to

Keyboard shortcuts

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