pkg

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserProviderVar  = new(UserProvider)
	UserProvider1Var = new(UserProvider1)
	UserProvider2Var = new(UserProvider2)
)

Functions

This section is empty.

Types

type User

type User struct {
	ID   string
	Name string
	Age  int64
	Time int64
	Sex  string
}

func (User) String

func (u User) String() string

type UserProvider

type UserProvider struct {
	GetUsers func(req []interface{}) ([]User, error)
	GetUser  func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0 func(id string, name string, age int) (*User, error)
	GetUser1 func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser2 func(ctx context.Context, req []interface{}, rsp *User) error `dubbo:"getUser"`
	GetUser3 func() error
	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
}

func (*UserProvider) Reference

func (u *UserProvider) Reference() string

type UserProvider1

type UserProvider1 struct {
	GetUsers func(req []interface{}) ([]User, error)
	GetUser  func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0 func(id string, name string, age int) (User, error)
	GetUser1 func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser2 func(ctx context.Context, req []interface{}, rsp *User) error `dubbo:"getUser"`
	GetUser3 func() error
	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
}

func (*UserProvider1) Reference

func (u *UserProvider1) Reference() string

type UserProvider2

type UserProvider2 struct {
	GetUsers func(req []interface{}) ([]User, error)
	GetUser  func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0 func(id string, name string, age int) (User, error)
	GetUser1 func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser2 func(ctx context.Context, req []interface{}, rsp *User) error `dubbo:"getUser"`
	GetUser3 func() error
	Echo     func(ctx context.Context, req interface{}) (interface{}, error) // Echo represent EchoFilter will be used
}

func (*UserProvider2) Reference

func (u *UserProvider2) Reference() string

Jump to

Keyboard shortcuts

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