model

package
v1.26.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHTTPTransportOption

type ClientHTTPTransportOption struct {
	Enable bool
}

type ConfigDocOption added in v1.25.0

type ConfigDocOption struct {
	Enable    bool
	OutputDir string
}

type ConfigOption

type ConfigOption struct {
	FuncName   string
	Struct     *types.Struct
	StructType types.Type
	StructExpr ast.Expr
	Doc        ConfigDocOption
}

type DeclType added in v1.22.0

type DeclType struct {
	Obj      stdtypes.Object
	RecvType stdtypes.Type
	Links    *list.List
	Values   []stdtypes.TypeAndValue
}

type Enum added in v1.24.1

type Enum struct {
	Name  string
	Value string
}

type Env added in v1.25.0

type Env struct {
	Name string
}

type ErrorHTTPTransportOption added in v1.22.0

type ErrorHTTPTransportOption struct {
	Named     *stdtypes.Named
	Code      int64
	IsPointer bool
}

type GatewayMethodOption added in v1.23.0

type GatewayMethodOption struct {
	Name         string
	BalancerType string
}

type GatewayOption added in v1.23.0

type GatewayOption struct {
	Services []GatewayServiceOption
}

type GatewayServiceOption added in v1.23.0

type GatewayServiceOption struct {
	ID            string
	RawID         string
	Type          stdtypes.Type
	TypeName      *stdtypes.Named
	Iface         *stdtypes.Interface
	MethodOptions map[string]GatewayMethodOption
}

type GenerateInfo

type GenerateInfo struct {
	Pkg         *packages.Package
	BasePkgPath string
	RootPath    string
	Pkgs        []*packages.Package
	CommentMap  *typeutil.Map
	ReturnTypes map[uint32][]interface{}
	BasePath    string
	Version     string
	GraphTypes  *graph.Graph
	MapTypes    map[uint32]*DeclType
	Enums       *typeutil.Map
	GitTags     []git.Tag
}

type InstrumentingServiceOption

type InstrumentingServiceOption struct {
	Enable    bool
	Namespace string
	Subsystem string
}

type JsonRPCHTTPTransportOption

type JsonRPCHTTPTransportOption struct {
	Enable bool
	Path   string
}

type MarkdownDocHTTPTransportOption added in v1.24.1

type MarkdownDocHTTPTransportOption struct {
	Enable    bool
	OutputDir string
}

type MethodHTTPTransportOption

type MethodHTTPTransportOption struct {
	MethodName         string
	Expr               ast.Expr
	Path               string
	PathVars           map[string]string
	HeaderVars         map[string]string
	QueryVars          map[string]string
	WrapResponse       WrapResponseHTTPTransportOption
	ServerRequestFunc  ReqRespFunc
	ServerResponseFunc ReqRespFunc
	ClientRequestFunc  ReqRespFunc
	ClientResponseFunc ReqRespFunc
}

type OpenapiHTTPTransportOption

type OpenapiHTTPTransportOption struct {
	Enable        bool
	Output        string
	Servers       []openapi.Server
	Info          openapi.Info
	Methods       map[string]*OpenapiMethodOption
	DefaultMethod OpenapiMethodOption
}

type OpenapiMethodOption

type OpenapiMethodOption struct {
	Tags []string
}

type ReqRespFunc

type ReqRespFunc struct {
	Type stdtypes.Type
	Expr ast.Expr
}

type ServiceMethod

type ServiceMethod struct {
	Type         *stdtypes.Func
	Name         string
	LcName       string
	Params       VarSlice
	Results      VarSlice
	Comments     []string
	ParamCtx     *stdtypes.Var
	ReturnErr    *stdtypes.Var
	ResultsNamed bool
	Errors       map[uint32]*ErrorHTTPTransportOption
	T            stdtypes.Type
}

type ServiceOption

type ServiceOption struct {
	ID            string
	RawID         string
	Transport     TransportOption
	Instrumenting InstrumentingServiceOption
	Logging       bool
	Methods       []ServiceMethod
	Type          stdtypes.Type
	TypeName      *stdtypes.Named
	Interface     *stdtypes.Interface
	Readme        ServiceReadme
}

type ServiceReadme added in v1.24.1

type ServiceReadme struct {
	Enable       bool
	OutputDir    string
	TemplatePath string
}

type TransportOption

type TransportOption struct {
	Protocol             string
	Prefix               string
	ServerDisabled       bool
	Client               ClientHTTPTransportOption
	Openapi              OpenapiHTTPTransportOption
	MarkdownDoc          MarkdownDocHTTPTransportOption
	FastHTTP             bool
	JsonRPC              JsonRPCHTTPTransportOption
	MethodOptions        map[string]MethodHTTPTransportOption
	DefaultMethodOptions MethodHTTPTransportOption
	Errors               map[uint32]*ErrorHTTPTransportOption
}

type VarSlice

type VarSlice []*stdtypes.Var

func (VarSlice) LookupField

func (s VarSlice) LookupField(name string) *stdtypes.Var

type WrapResponseHTTPTransportOption

type WrapResponseHTTPTransportOption struct {
	Enable bool
	Name   string
}

Jump to

Keyboard shortcuts

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