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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAN hessian.JavaEnum = iota
	WOMAN
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Gender

type Gender hessian.JavaEnum

func (Gender) EnumValue

func (g Gender) EnumValue(s string) hessian.JavaEnum

func (Gender) JavaClassName

func (g Gender) JavaClassName() string

func (Gender) String

func (g Gender) String() string

type User

type User struct {
	// !!! Cannot define lowercase names of variable
	ID   string
	Name string
	Age  int32
	Time time.Time
	Sex  Gender // notice: java enum Object <--> go string
}

func (User) JavaClassName

func (User) JavaClassName() string

func (User) String

func (u User) String() string

type UserProvider

type UserProvider struct {
	GetUsers  func(req []interface{}) ([]interface{}, error)
	GetErr    func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser   func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0  func(id string, name string) (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
	GetGender func(i int32) (Gender, 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{}) ([]interface{}, error)
	GetErr   func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser  func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0 func(id string, name string) (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{}) ([]interface{}, error)
	GetErr   func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser  func(ctx context.Context, req []interface{}, rsp *User) error
	GetUser0 func(id string, name string) (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