driver

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAppInfo

func GetAppInfo() (interface{}, error)

func GetConfig

func GetConfig(p string) (interface{}, error)

func GetData

func GetData(rs interface{}, err error) (interface{}, error)

func GetResult

func GetResult(rs interface{}, err error) (interface{}, error)

func MergeData

func MergeData(rs interface{}, err error) (interface{}, error)

Types

type PBResult

type PBResult interface {
	GetErrno() int32
	GetErrmsg() string
}

type RouteScheme added in v1.0.23

type RouteScheme struct {
	Items []*RouteSchemeItem `json:"items"`
}

type RouteSchemeItem added in v1.0.23

type RouteSchemeItem struct {
	Alias     string                            `json:"alias"`
	Title     string                            `json:"title"`
	Scheme    micro.IScheme                     `json:"scheme"`
	GetScheme func(micro.Context) micro.IScheme `json:"-"`
}

type Router added in v1.0.18

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

func NewRouter added in v1.0.18

func NewRouter() *Router

func (*Router) Add added in v1.0.19

func (R *Router) Add(match func(name string) (string, bool), executor micro.Executor) *Router

func (*Router) Alias added in v1.0.19

func (R *Router) Alias(alias string, executor micro.Executor) *Router

func (*Router) Exec added in v1.0.19

func (R *Router) Exec(ctx micro.Context, name string, data interface{}) (interface{}, error)

func (*Router) Interceptor added in v1.0.27

func (R *Router) Interceptor(pattern *regexp.Regexp, interceptor func(ctx micro.Context, name string, data interface{}) error) *Router

func (*Router) Rewrite added in v1.0.19

func (R *Router) Rewrite(pattern *regexp.Regexp, to string, executor micro.Executor) *Router

func (*Router) Scheme added in v1.0.23

func (R *Router) Scheme(ctx micro.Context) micro.IScheme

func (*Router) Service added in v1.0.20

func (R *Router) Service(alias string, serviceName string) *Router

func (*Router) Use added in v1.0.19

func (R *Router) Use(pattern *regexp.Regexp, executor micro.Executor) *Router

Jump to

Keyboard shortcuts

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