gen

package
v0.0.0-...-ed363d7 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallSupportOptionsWatchDog

func InstallSupportOptionsWatchDog(dog func(cc *SupportOptions))

InstallSupportOptionsWatchDog install watch dog

func WriteFile

func WriteFile(fname string, data []byte) (err error)

Types

type CustomFlagBoolValue

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

-- bool Value

func (*CustomFlagBoolValue) Set

func (s *CustomFlagBoolValue) Set(val string) error

func (*CustomFlagBoolValue) String

func (s *CustomFlagBoolValue) String() string

func (*CustomFlagBoolValue) Type

func (s *CustomFlagBoolValue) Type() string

type CustomFlagIntValue

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

-- int Value

func (*CustomFlagIntValue) Set

func (s *CustomFlagIntValue) Set(val string) error

func (*CustomFlagIntValue) String

func (s *CustomFlagIntValue) String() string

func (*CustomFlagIntValue) Type

func (s *CustomFlagIntValue) Type() string

type CustomFlagStringValue

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

-- string Value

func (*CustomFlagStringValue) Set

func (s *CustomFlagStringValue) Set(val string) error

func (*CustomFlagStringValue) String

func (s *CustomFlagStringValue) String() string

func (*CustomFlagStringValue) Type

func (s *CustomFlagStringValue) Type() string

type ExportOption

type ExportOption struct {
	// 当前输出路径
	Outpath string
	// Type 路径
	TypePath string
	// Data 路径
	DataPath string
	// 导出标记
	ExportFlag parser.ExportFlag
}

type ExportSupportConfig

type ExportSupportConfig struct {
	// Language 导出名字
	Language string
	// 导出选项
	Opts *SupportOptions
	// contains filtered or unexported fields
}

ExportSupport 导出生成支持的配置项

func NewExportConfig

func NewExportConfig(language string, opts ...SupportOption) *ExportSupportConfig

func (*ExportSupportConfig) BoolVar

func (cfg *ExportSupportConfig) BoolVar(p *bool, name string, value bool, usage string, updates ...func())

BoolVar defines a bool flag with specified name, default value, and usage string. The argument p points to a bool variable in which to store the value of the flag.

func (*ExportSupportConfig) ExportFlag

func (cfg *ExportSupportConfig) ExportFlag() parser.ExportFlag

func (*ExportSupportConfig) HasSetFlag

func (cfg *ExportSupportConfig) HasSetFlag() bool

func (*ExportSupportConfig) Int64OptionsVar

func (cfg *ExportSupportConfig) Int64OptionsVar(p *int64, name string, value int64, usage string, opts []int64, updates ...func())

func (*ExportSupportConfig) Int64Var

func (cfg *ExportSupportConfig) Int64Var(p *int64, name string, value int64, usage string, updates ...func())

Int64Var defines an int64 flag with specified name, default value, and usage string. The argument p points to an int64 variable in which to store the value of the flag.

func (*ExportSupportConfig) OutpathData

func (cfg *ExportSupportConfig) OutpathData() string

数据导出目录

func (*ExportSupportConfig) OutpathType

func (cfg *ExportSupportConfig) OutpathType() string

类型导出目录

func (*ExportSupportConfig) SetFlagSet

func (cfg *ExportSupportConfig) SetFlagSet(set *pflag.FlagSet)

func (*ExportSupportConfig) StringVar

func (cfg *ExportSupportConfig) StringVar(p *string, name string, value string, usage string, updates ...func())

StringVar defines a string flag with specified name, default value, and usage string. The argument p points to a string variable in which to store the value of the flag.

type SupportOption

type SupportOption func(cc *SupportOptions) SupportOption

SupportOption option define

func WithCheckOptions

func WithCheckOptions(v func() error) SupportOption

检测配置

func WithExportData

func WithExportData(v func(sheet *parser.XlsxSheet, opts *ExportOption) (err error)) SupportOption

导出数据文件

func WithExportDefine

func WithExportDefine(v func(sheet *parser.XlsxSheet, opts *ExportOption) (err error)) SupportOption

导出类型文件

func WithExportMergeData

func WithExportMergeData(v func(sheets []*parser.XlsxSheet, opts *ExportOption) (err error)) SupportOption

合并导出数据

func WithExportMergeDefine

func WithExportMergeDefine(v func(sheets []*parser.XlsxSheet, opts *ExportOption) (err error)) SupportOption

合并导出类型

type SupportOptions

type SupportOptions struct {
	// 导出类型文件
	ExportDefine func(sheet *parser.XlsxSheet, opts *ExportOption) (err error)
	// 合并导出类型
	ExportMergeDefine func(sheets []*parser.XlsxSheet, opts *ExportOption) (err error)
	// 导出数据文件
	ExportData func(sheet *parser.XlsxSheet, opts *ExportOption) (err error)
	// 合并导出数据
	ExportMergeData func(sheets []*parser.XlsxSheet, opts *ExportOption) (err error)
	// 检测配置
	CheckOptions func() error
}

ServerOption

func NewSupportOptions

func NewSupportOptions(opts ...SupportOption) *SupportOptions

NewSupportOptions create options instance.

func (*SupportOptions) ApplyOption

func (cc *SupportOptions) ApplyOption(opts ...SupportOption)

ApplyOption modify options

func (*SupportOptions) GetSetOption

func (cc *SupportOptions) GetSetOption(opt SupportOption) SupportOption

GetSetOption modify and get last option

func (*SupportOptions) SetOption

func (cc *SupportOptions) SetOption(opt SupportOption)

SetOption modify options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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