pkg

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	DefaultUser = User{
		ID: "0", Name: "Alex Stocks", Age: 31,
		Sex: Gender(MAN),
	}
)

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 (u User) JavaClassName() string

func (User) String

func (u User) String() string

type UserProvider

type UserProvider struct {
}

func (*UserProvider) GetErr

func (u *UserProvider) GetErr(ctx context.Context, req []interface{}, rsp *User) error

func (*UserProvider) GetGender

func (s *UserProvider) GetGender(i int32) (hessian.JavaEnum, error)

func (*UserProvider) GetUser

func (u *UserProvider) GetUser(ctx context.Context, req []interface{}, rsp *User) error

func (*UserProvider) GetUser0

func (u *UserProvider) GetUser0(id string, name string) (User, error)

func (*UserProvider) GetUser2

func (u *UserProvider) GetUser2(ctx context.Context, req []interface{}, rsp *User) error

func (*UserProvider) GetUser3

func (u *UserProvider) GetUser3() error

func (*UserProvider) GetUsers

func (u *UserProvider) GetUsers(req []interface{}) ([]interface{}, error)

func (*UserProvider) MethodMapper

func (s *UserProvider) MethodMapper() map[string]string

func (*UserProvider) Reference

func (u *UserProvider) Reference() string

Jump to

Keyboard shortcuts

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