generator

package
v3.0.28 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientType

func ClientType(iface *config.Interface) string

func IfaceMiddlewareTypeName

func IfaceMiddlewareTypeName(iface *config.Interface) string

func LcAppName

func LcAppName(iface *config.Interface) string

func LcNameEndpoint

func LcNameEndpoint(iface *config.Interface, fn *option.FuncType) string

func LcNameIfaceMethod

func LcNameIfaceMethod(iface *config.Interface, fn *option.FuncType) string

func LcNameJS

func LcNameJS(iface *config.Interface) string

func LcNameWithAppPrefix

func LcNameWithAppPrefix(iface *config.Interface, notInternal ...bool) string

func NameEndpointSetName

func NameEndpointSetName(iface *config.Interface) string

func NameEndpointSetNameVar

func NameEndpointSetNameVar(iface *config.Interface) string

func NameInstrumentingMiddleware

func NameInstrumentingMiddleware(iface *config.Interface) string

func NameInterface

func NameInterface(iface *config.Interface) string

func NameLoggingMiddleware

func NameLoggingMiddleware(iface *config.Interface) string

func NameMakeEndpoint

func NameMakeEndpoint(m *option.FuncType, iface *config.Interface) string

func NameRequest

func NameRequest(m *option.FuncType, iface *config.Interface) string

func NameResponse

func NameResponse(m *option.FuncType, iface *config.Interface) string

func ServicePropName

func ServicePropName(iface *config.Interface) string

func UcAppName

func UcAppName(iface *config.Interface) string

func UcNameIfaceMethod

func UcNameIfaceMethod(iface *config.Interface, fn *option.FuncType) string

func UcNameJS

func UcNameJS(iface *config.Interface) string

func UcNameWithAppPrefix

func UcNameWithAppPrefix(iface *config.Interface, useServicePrefix ...bool) string

Types

type CURL

type CURL struct {
	Interfaces    []*config.Interface
	MethodOptions map[string]config.MethodOptions
	JSONRPCEnable bool
	JSONRPCPath   string
	Output        string
	URL           string
	// contains filtered or unexported fields
}

func (*CURL) Filename

func (g *CURL) Filename() string

func (*CURL) Generate

func (g *CURL) Generate(ctx context.Context) []byte

func (*CURL) OutputPath added in v3.0.22

func (g *CURL) OutputPath() string

type ClientHelpers

type ClientHelpers struct {
	Interfaces    []*config.Interface
	JSONRPCEnable bool
	UseFast       bool
	IfaceErrors   map[string]map[string][]config.Error
	Output        string
	Pkg           string
	// contains filtered or unexported fields
}

func (*ClientHelpers) Filename

func (g *ClientHelpers) Filename() string

func (*ClientHelpers) Generate

func (g *ClientHelpers) Generate(ctx context.Context) []byte

func (*ClientHelpers) OutputPath added in v3.0.22

func (g *ClientHelpers) OutputPath() string

func (*ClientHelpers) Package

func (g *ClientHelpers) Package() string

type ClientStruct

type ClientStruct struct {
	UseFast       bool
	JSONRPCEnable bool
	Interfaces    []*config.Interface
	Output        string
	Pkg           string
	// contains filtered or unexported fields
}

func (*ClientStruct) Filename

func (g *ClientStruct) Filename() string

func (*ClientStruct) Generate

func (g *ClientStruct) Generate(ctx context.Context) []byte

func (*ClientStruct) OutputPath added in v3.0.22

func (g *ClientStruct) OutputPath() string

func (*ClientStruct) Package

func (g *ClientStruct) Package() string

type Endpoint

type Endpoint struct {
	Interfaces       []*config.Interface
	HTTPServerEnable bool
	Output           string
	Pkg              string
	// contains filtered or unexported fields
}

func (*Endpoint) Filename

func (g *Endpoint) Filename() string

func (*Endpoint) Generate

func (g *Endpoint) Generate(ctx context.Context) []byte

func (*Endpoint) OutputPath added in v3.0.22

func (g *Endpoint) OutputPath() string

func (*Endpoint) Package

func (g *Endpoint) Package() string

type GatewayGenerator

type GatewayGenerator struct {
	Interfaces []*config.Interface
	// contains filtered or unexported fields
}

func (*GatewayGenerator) Filename

func (g *GatewayGenerator) Filename() string

func (*GatewayGenerator) Generate

func (g *GatewayGenerator) Generate(ctx context.Context) []byte

func (*GatewayGenerator) OutputPath added in v3.0.22

func (g *GatewayGenerator) OutputPath() string

type Instrumenting

type Instrumenting struct {
	Interfaces    []*config.Interface
	MethodOptions map[string]config.MethodOptions
	Labels        []config.InstrumentingLabel
	// contains filtered or unexported fields
}

func (*Instrumenting) Filename

func (g *Instrumenting) Filename() string

func (*Instrumenting) Generate

func (g *Instrumenting) Generate(ctx context.Context) []byte

func (*Instrumenting) OutputPath added in v3.0.22

func (g *Instrumenting) OutputPath() string

type InterfaceGenerator

type InterfaceGenerator struct {
	Interfaces []*config.Interface
	Output     string
	Pkg        string
	// contains filtered or unexported fields
}

func (*InterfaceGenerator) Filename

func (g *InterfaceGenerator) Filename() string

func (*InterfaceGenerator) Generate

func (g *InterfaceGenerator) Generate(ctx context.Context) []byte

func (*InterfaceGenerator) OutputPath added in v3.0.22

func (g *InterfaceGenerator) OutputPath() string

func (*InterfaceGenerator) Package

func (g *InterfaceGenerator) Package() string

type JSONRPCClientGenerator

type JSONRPCClientGenerator struct {
	Interfaces []*config.Interface
	UseFast    bool
	Output     string
	Pkg        string
	// contains filtered or unexported fields
}

func (*JSONRPCClientGenerator) Filename

func (g *JSONRPCClientGenerator) Filename() string

func (*JSONRPCClientGenerator) Generate

func (g *JSONRPCClientGenerator) Generate(ctx context.Context) []byte

func (*JSONRPCClientGenerator) OutputPath added in v3.0.22

func (g *JSONRPCClientGenerator) OutputPath() string

func (*JSONRPCClientGenerator) Package

func (g *JSONRPCClientGenerator) Package() string

type JSONRPCDocGenerator

type JSONRPCDocGenerator struct {
	AppName         string
	JSPkgImportPath string
	Interfaces      []*config.Interface
	IfaceErrors     map[string]map[string][]config.Error
	Output          string
	// contains filtered or unexported fields
}

func (*JSONRPCDocGenerator) Filename

func (g *JSONRPCDocGenerator) Filename() string

func (*JSONRPCDocGenerator) Generate

func (g *JSONRPCDocGenerator) Generate(ctx context.Context) []byte

func (*JSONRPCDocGenerator) OutputPath added in v3.0.22

func (g *JSONRPCDocGenerator) OutputPath() string

type JSONRPCJSClientGenerator

type JSONRPCJSClientGenerator struct {
	Interfaces  []*config.Interface
	IfaceErrors map[string]map[string][]config.Error
	// contains filtered or unexported fields
}

func (*JSONRPCJSClientGenerator) Filename

func (g *JSONRPCJSClientGenerator) Filename() string

func (*JSONRPCJSClientGenerator) Generate

func (g *JSONRPCJSClientGenerator) Generate(ctx context.Context) []byte

func (*JSONRPCJSClientGenerator) OutputPath added in v3.0.22

func (g *JSONRPCJSClientGenerator) OutputPath() string

type JSONRPCServerGenerator

type JSONRPCServerGenerator struct {
	UseFast     bool
	Interfaces  []*config.Interface
	JSONRPCPath string
	// contains filtered or unexported fields
}

func (*JSONRPCServerGenerator) Filename

func (g *JSONRPCServerGenerator) Filename() string

func (*JSONRPCServerGenerator) Generate

func (g *JSONRPCServerGenerator) Generate(ctx context.Context) []byte

func (*JSONRPCServerGenerator) OutputPath added in v3.0.22

func (g *JSONRPCServerGenerator) OutputPath() string

type Logging

type Logging struct {
	Interfaces    []*config.Interface
	MethodOptions map[string]config.MethodOptions
	// contains filtered or unexported fields
}

func (*Logging) Filename

func (g *Logging) Filename() string

func (*Logging) Generate

func (g *Logging) Generate(ctx context.Context) []byte

func (*Logging) OutputPath added in v3.0.22

func (g *Logging) OutputPath() string

type MiddlewareChain

type MiddlewareChain struct {
	Output string
	Pkg    string
	// contains filtered or unexported fields
}

func (*MiddlewareChain) Filename

func (g *MiddlewareChain) Filename() string

func (*MiddlewareChain) Generate

func (g *MiddlewareChain) Generate(ctx context.Context) []byte

func (*MiddlewareChain) OutputPath added in v3.0.22

func (g *MiddlewareChain) OutputPath() string

func (*MiddlewareChain) Package

func (g *MiddlewareChain) Package() string

type Openapi

type Openapi struct {
	JSONRPCEnable bool
	Contact       config.OpenapiContact
	Info          config.OpenapiInfo
	MethodTags    map[string][]string
	Servers       []config.OpenapiServer
	Licence       config.OpenapiLicence
	Output        string
	Interfaces    []*config.Interface
	MethodOptions map[string]config.MethodOptions
	IfaceErrors   map[string]map[string][]config.Error
	// contains filtered or unexported fields
}

func (*Openapi) Filename

func (g *Openapi) Filename() string

func (*Openapi) Generate

func (g *Openapi) Generate(ctx context.Context) []byte

func (*Openapi) OutputPath added in v3.0.22

func (g *Openapi) OutputPath() string

type RESTClientGenerator

type RESTClientGenerator struct {
	Interfaces    []*config.Interface
	UseFast       bool
	MethodOptions map[string]config.MethodOptions
	Output        string
	Pkg           string
	// contains filtered or unexported fields
}

func (*RESTClientGenerator) Filename

func (g *RESTClientGenerator) Filename() string

func (*RESTClientGenerator) Generate

func (g *RESTClientGenerator) Generate(ctx context.Context) []byte

func (*RESTClientGenerator) OutputPath added in v3.0.22

func (g *RESTClientGenerator) OutputPath() string

func (*RESTClientGenerator) Package

func (g *RESTClientGenerator) Package() string

type RESTServerGenerator

type RESTServerGenerator struct {
	UseFast       bool
	JSONRPCEnable bool
	Interfaces    []*config.Interface
	MethodOptions map[string]config.MethodOptions
	// contains filtered or unexported fields
}

func (*RESTServerGenerator) Filename

func (g *RESTServerGenerator) Filename() string

func (*RESTServerGenerator) Generate

func (g *RESTServerGenerator) Generate(ctx context.Context) []byte

func (*RESTServerGenerator) OutputPath added in v3.0.22

func (g *RESTServerGenerator) OutputPath() string

type ServerHelpers

type ServerHelpers struct {
	Interfaces       []*config.Interface
	JSONRPCEnable    bool
	HTTPServerEnable bool
	UseFast          bool
	Output           string
	Pkg              string
	// contains filtered or unexported fields
}

func (*ServerHelpers) Filename

func (g *ServerHelpers) Filename() string

func (*ServerHelpers) Generate

func (g *ServerHelpers) Generate(ctx context.Context) []byte

func (*ServerHelpers) OutputPath added in v3.0.22

func (g *ServerHelpers) OutputPath() string

func (*ServerHelpers) Package

func (g *ServerHelpers) Package() string

Jump to

Keyboard shortcuts

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