config

package
v0.0.0-...-aec0189 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Argument

type Argument struct {
	Verbose bool

	*ServerArgument
	*ClientArgument
	*ModelArgument
	*FallbackArgument
}

func GetGlobalArgs

func GetGlobalArgs() *Argument

func NewArgument

func NewArgument() *Argument

type ClientArgument

type ClientArgument struct {
	// Common Param
	*CommonParam

	SliceParam *SliceParam

	Verbose  bool
	Template string
	Cwd      string
	GoSrc    string
	GoPkg    string
	GoPath   string
}

func NewClientArgument

func NewClientArgument() *ClientArgument

func (*ClientArgument) ParseCli

func (c *ClientArgument) ParseCli(ctx *cli.Context) error

type CommonParam

type CommonParam struct {
	Service  string // service name
	Type     string // GenerateType: RPC or HTTP
	GoMod    string // Go Mod name
	IdlPath  string
	OutDir   string // output path
	Registry string
}

type DialectorFunc

type DialectorFunc func(string) gorm.Dialector

type FallbackArgument

type FallbackArgument struct {
	ToolType consts.ToolType
	Args     []string
}

func NewFallbackArgument

func NewFallbackArgument() *FallbackArgument

func (*FallbackArgument) ParseCli

func (c *FallbackArgument) ParseCli(ctx *cli.Context) error

type ModelArgument

type ModelArgument struct {
	DSN               string
	Type              string
	Tables            []string
	ExcludeTables     []string
	OnlyModel         bool
	OutPath           string
	OutFile           string
	WithUnitTest      bool
	ModelPkgName      string
	FieldNullable     bool
	FieldSignable     bool
	FieldWithIndexTag bool
	FieldWithTypeTag  bool
}

func NewModelArgument

func NewModelArgument() *ModelArgument

func (*ModelArgument) ParseCli

func (c *ModelArgument) ParseCli(ctx *cli.Context) error

type ServerArgument

type ServerArgument struct {
	// Common Param
	*CommonParam

	Template   string
	SliceParam *SliceParam
	Verbose    bool
	Hex        bool // add http listen for kitex

	Cwd    string
	GoSrc  string
	GoPkg  string
	GoPath string
}

func NewServerArgument

func NewServerArgument() *ServerArgument

func (*ServerArgument) ParseCli

func (s *ServerArgument) ParseCli(ctx *cli.Context) error

type SliceParam

type SliceParam struct {
	Pass            []string
	ProtoSearchPath []string
}

func (*SliceParam) WriteAnswer

func (s *SliceParam) WriteAnswer(name string, value interface{}) error

Jump to

Keyboard shortcuts

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