Versions in this module Expand all Collapse all v0 v0.6.1 Jul 31, 2023 v0.0.4 Jul 31, 2023 Changes in this version + const BootstrapFileName + const BuildFileName + const ClientFileName + const DefaultCodec + const DefaultThriftPluginTimeLimit + const ExtensionFilename + const HandlerFileName + const InvokerFileName + const KitexGenPath + const MainFileName + const ServerFileName + const ServiceFileName + const ToolVersionFileName + var DefaultDelimiters = [2]string + func AddGlobalDependency(ref, path string) bool + func AddGlobalMiddleware(mw Middleware) + func FilterImports(Imports map[string]map[string]bool, ms []*MethodInfo) map[string]map[string]bool + func HasFeature(list []feature, key string) bool + func ImportPathTo(pkg string) string + func NewCustomGenerator(pkg *PackageInfo, basePath string) *customGenerator + func RegisterFeature(key string) + func SetKitexImportPath(path string) + func SetTemplateExtension(name, text string) + type APIExtension struct + ExtendFile string + ExtendOption string + ImportPaths []string + func (a *APIExtension) Merge(other *APIExtension) + type Config struct + CombineService bool + CopyIDL bool + DeepCopyAPI bool + ExtensionFile string + Features []feature + FrugalPretouch bool + GenPath string + GenerateInvoker bool + GenerateMain bool + IDL string + IDLType string + Includes util.StringSlice + ModuleName string + NoFastAPI bool + OutputPath string + PackagePrefix string + ProtobufOptions util.StringSlice + ProtobufPlugins util.StringSlice + Record bool + RecordCmd []string + ServiceName string + TemplateDir string + ThriftOptions util.StringSlice + ThriftPluginTimeLimit time.Duration + ThriftPlugins util.StringSlice + Use string + Verbose bool + Version string + func (c *Config) AddFeature(key string) bool + func (c *Config) ApplyExtension() error + func (c *Config) Pack() (res []string) + func (c *Config) Unpack(args []string) error + type File struct + Content string + Name string + type Generator interface + GenerateCustomPackage func(pkg *PackageInfo) ([]*File, error) + GenerateMainPackage func(pkg *PackageInfo) ([]*File, error) + GenerateService func(pkg *PackageInfo) ([]*File, error) + func NewGenerator(config *Config, middlewares []Middleware) Generator + type HandleFunc func(*Task, *PackageInfo) (*File, error) + type MethodInfo struct + ArgStructName string + Args []*Parameter + ClientStreaming bool + Exceptions []*Parameter + GenArgResultStruct bool + IsResponseNeedRedirect bool + Name string + Oneway bool + RawName string + ResStructName string + Resp *Parameter + ServerStreaming bool + ServiceName string + Void bool + type Middleware func(HandleFunc) HandleFunc + type PackageInfo struct + Codec string + Dependencies map[string]string + ExternalKitexGen string + Features []feature + FrugalPretouch bool + Imports map[string]map[string]bool + Module string + Namespace string + NoFastAPI bool + RealServiceName string + Version string + func (p *PackageInfo) AddImport(pkg, path string) + func (p *PackageInfo) AddImports(pkgs ...string) + type Parameter struct + Deps []PkgInfo + Name string + RawName string + Type string + type PkgInfo struct + ImportPath string + PkgName string + PkgRefName string + type ServiceInfo struct + Base *ServiceInfo + CombineServices []*ServiceInfo + HasStreaming bool + Methods []*MethodInfo + RawServiceName string + ServiceName string + ServiceTypeName func() string + func (s *ServiceInfo) AllMethods() (ms []*MethodInfo) + type Task struct + Ext *APIExtension + Name string + Path string + Text string + func (t *Task) Build() error + func (t *Task) Render(data interface{}) (*File, error) + func (t *Task) RenderString(data interface{}) (string, error) + type Template struct + Body string + LoopMethod bool + LoopService bool + Path string + UpdateBehavior *Update + type TemplateExtension struct + Dependencies map[string]string + EnableFeatures []string + ExtendClient *APIExtension + ExtendInvoker *APIExtension + ExtendServer *APIExtension + FeatureNames []string + func (p *TemplateExtension) FromJSONFile(filename string) error + func (p *TemplateExtension) FromYAMLFile(filename string) error + func (p *TemplateExtension) Merge(other *TemplateExtension) + func (p *TemplateExtension) ToJSONFile(filename string) error + func (p *TemplateExtension) ToYAMLFile(filename string) error + type Update struct + AppendTpl string + ImportTpl []string + Key string + Type string