model

package
v2.0.0-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigDocOption

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

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

type Enum

type Enum struct {
	Name  string
	Value string
}

type Env

type Env struct {
	Name string
}

type GatewayMethodOption

type GatewayMethodOption struct {
	Name         string
	BalancerType string
}

type GatewayServiceOption

type GatewayServiceOption struct {
	Iface         *ServiceInterface
	MethodOptions map[string]GatewayMethodOption
}

type HTTPError

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

type Interfaces

type Interfaces []*ServiceInterface

func (Interfaces) At

func (i Interfaces) At(index int) *ServiceInterface

func (Interfaces) Len

func (i Interfaces) Len() int

type MethodOption

type MethodOption 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
	LoggingEnable        bool
	LoggingIncludeParams map[string]struct{}
	LoggingExcludeParams map[string]struct{}
	InstrumentingEnable  bool
}

type ReqRespFunc

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

type ServiceInterface

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

func NewServiceInterface

func NewServiceInterface(
	name, lowerName, nameExport, nameUnExport string,
	serviceType stdtypes.Type,
	serviceTypeName *stdtypes.Named,
	serviceIface *stdtypes.Interface,
	serviceMethods []ServiceMethod,
) *ServiceInterface

func (*ServiceInterface) Interface

func (g *ServiceInterface) Interface() *stdtypes.Interface

func (*ServiceInterface) LoweName

func (g *ServiceInterface) LoweName() string

func (*ServiceInterface) Methods

func (g *ServiceInterface) Methods() []ServiceMethod

func (*ServiceInterface) Name

func (g *ServiceInterface) Name() string

func (*ServiceInterface) NameExport

func (g *ServiceInterface) NameExport() string

func (*ServiceInterface) NameUnExport

func (g *ServiceInterface) NameUnExport() string

func (*ServiceInterface) Type

func (g *ServiceInterface) Type() stdtypes.Type

func (*ServiceInterface) TypeName

func (g *ServiceInterface) TypeName() *stdtypes.Named

type ServiceMethod

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

type Transport

type Transport string
const (
	HTTPTransport Transport = "http"
)

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