gen

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(gcf config.GenConfig) error

func GetApiServiceName

func GetApiServiceName(apiDirName string) string

func GetMainApiFilePath

func GetMainApiFilePath(apiDirName string) (string, bool, error)

func GetProtoFilepath added in v0.20.0

func GetProtoFilepath(protoDirPath string) ([]string, error)

func RemoveExtraFiles added in v0.20.0

func RemoveExtraFiles(wd, style string)

Types

type HandlerFile

type HandlerFile struct {
	Group   string
	Handler string
	Path    string
}

type ImportLines

type ImportLines []string

func (ImportLines) String

func (l ImportLines) String() string

type JzeroApi

type JzeroApi struct {
	Wd                 string
	Module             string
	Style              string
	RemoveSuffix       bool
	ChangeReplaceTypes bool
	RegenApiHandler    bool
	RegenApiTypes      bool
}

func (*JzeroApi) Gen

func (ja *JzeroApi) Gen() error

type JzeroProtoApiMiddleware added in v0.23.3

type JzeroProtoApiMiddleware struct {
	Name   string
	Routes []string
}

type JzeroRpc

type JzeroRpc struct {
	Wd               string
	Module           string
	Style            string
	RemoveSuffix     bool
	ChangeLogicTypes bool
	RpcStylePatch    bool
}

func (*JzeroRpc) Gen

func (jr *JzeroRpc) Gen() error

func (*JzeroRpc) GetAllLogicFiles added in v0.20.0

func (jr *JzeroRpc) GetAllLogicFiles(protoSpec rpcparser.Proto) ([]LogicFile, error)

func (*JzeroRpc) GetAllServerFiles added in v0.20.0

func (jr *JzeroRpc) GetAllServerFiles(protoSpec rpcparser.Proto) ([]ServerFile, error)

type JzeroSql

type JzeroSql struct {
	Wd    string
	Style string

	ModelStrict               bool
	ModelIgnoreColumns        []string
	ModelMysqlDatasource      bool
	ModelMysqlDatasourceUrl   string
	ModelMysqlDatasourceTable []string
	ModelMysqlCache           bool
	ModelMysqlCachePrefix     string
}

func (*JzeroSql) Gen

func (js *JzeroSql) Gen() error

type LogicFile

type LogicFile struct {
	Package string
	// service
	Group string
	// rpc name
	Handler string
	Path    string

	RequestTypeName  string
	ResponseTypeName string
	ClientStream     bool
	ServerStream     bool
}

type RegisterLines

type RegisterLines []string

func (RegisterLines) String

func (l RegisterLines) String() string

type ServerFile

type ServerFile struct {
	Path    string
	Service string
}

type Table added in v0.18.5

type Table struct {
	Name string `db:"name"`
}

Jump to

Keyboard shortcuts

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