api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserProviderClient = &UserProvider{} // client pointer

Functions

This section is empty.

Types

type EchoMultiBoolResponse

type EchoMultiBoolResponse struct {
	BaseResp bool
	ListResp []bool
	MapResp  map[bool]bool
}

func (*EchoMultiBoolResponse) JavaClassName

func (resp *EchoMultiBoolResponse) JavaClassName() string

type EchoMultiByteResponse

type EchoMultiByteResponse struct {
	BaseResp int8
	ListResp []int8
	MapResp  map[int8]int8
}

func (*EchoMultiByteResponse) JavaClassName

func (resp *EchoMultiByteResponse) JavaClassName() string

type EchoMultiDoubleResponse

type EchoMultiDoubleResponse struct {
	BaseResp float64
	ListResp []float64
	MapResp  map[float64]float64
}

func (*EchoMultiDoubleResponse) JavaClassName

func (resp *EchoMultiDoubleResponse) JavaClassName() string

type EchoMultiFloatResponse

type EchoMultiFloatResponse struct {
	BaseResp float64
	ListResp []float64
	MapResp  map[float64]float64
}

func (*EchoMultiFloatResponse) JavaClassName

func (resp *EchoMultiFloatResponse) JavaClassName() string

type EchoMultiInt16Response

type EchoMultiInt16Response struct {
	BaseResp int16
	ListResp []int16
	MapResp  map[int16]int16
}

func (*EchoMultiInt16Response) JavaClassName

func (resp *EchoMultiInt16Response) JavaClassName() string

type EchoMultiInt32Response

type EchoMultiInt32Response struct {
	BaseResp int32
	ListResp []int32
	MapResp  map[int32]int32
}

func (*EchoMultiInt32Response) JavaClassName

func (resp *EchoMultiInt32Response) JavaClassName() string

type EchoMultiInt64Response

type EchoMultiInt64Response struct {
	BaseResp int64
	ListResp []int64
	MapResp  map[int64]int64
}

func (*EchoMultiInt64Response) JavaClassName

func (resp *EchoMultiInt64Response) JavaClassName() string

type EchoMultiStringResponse

type EchoMultiStringResponse struct {
	BaseResp string
	ListResp []string
	MapResp  map[string]string
}

func (*EchoMultiStringResponse) JavaClassName

func (resp *EchoMultiStringResponse) JavaClassName() string

type User

type User struct {
	ID   string
	Name string
	Age  int32
	Time time.Time
}

User transmission struct; for compatibility with java, field names should be consistent with Java class fields

func (*User) JavaClassName

func (u *User) JavaClassName() string

type UserProvider

type UserProvider struct {
	// dubbo tag is necessary to map go function name to java function name
	GetUser func(ctx context.Context, req int32) (*User, error) //`dubbo:"getUser"`
	EchoInt func(ctx context.Context, req int32) (int32, error) //`dubbo:"echoInt"`

	// base types
	EchoBool   func(ctx context.Context, req bool) (bool, error)       //`dubbo:"echoBool"`
	EchoByte   func(ctx context.Context, req int8) (int8, error)       //`dubbo:"echoByte"`
	EchoInt16  func(ctx context.Context, req int16) (int16, error)     //`dubbo:"echoInt16"`
	EchoInt32  func(ctx context.Context, req int32) (int32, error)     //`dubbo:"echoInt32"`
	EchoInt64  func(ctx context.Context, req int64) (int64, error)     //`dubbo:"echoInt64"`
	EchoFloat  func(ctx context.Context, req float64) (float64, error) //`dubbo:"echoFloat"`
	EchoDouble func(ctx context.Context, req float64) (float64, error) //`dubbo:"echoDouble"`
	EchoString func(ctx context.Context, req string) (string, error)   //`dubbo:"echoString"`

	// special types
	EchoBinary func(ctx context.Context, req []byte) ([]byte, error) //`dubbo:"echoBinary"`

	// container list
	EchoBoolList   func(ctx context.Context, req []bool) ([]bool, error)       //`dubbo:"echoBoolList"`
	EchoByteList   func(ctx context.Context, req []int8) ([]int8, error)       //`dubbo:"echoByteList"`
	EchoInt16List  func(ctx context.Context, req []int16) ([]int16, error)     //`dubbo:"echoInt16List"`
	EchoInt32List  func(ctx context.Context, req []int32) ([]int32, error)     //`dubbo:"echoInt32List"`
	EchoInt64List  func(ctx context.Context, req []int64) ([]int64, error)     //`dubbo:"echoInt64List"`
	EchoFloatList  func(ctx context.Context, req []float64) ([]float64, error) //`dubbo:"echoFloatList"`
	EchoDoubleList func(ctx context.Context, req []float64) ([]float64, error) //`dubbo:"echoDoubleList"`
	EchoStringList func(ctx context.Context, req []string) ([]string, error)   //`dubbo:"echoStringList"`
	EchoBinaryList func(ctx context.Context, req [][]byte) ([][]byte, error)   //`dubbo:"echoBinaryList"`

	// container map
	EchoBool2BoolMap   func(ctx context.Context, req map[bool]bool) (map[bool]bool, error)       //`dubbo:"echoBool2BoolMap"`
	EchoBool2ByteMap   func(ctx context.Context, req map[bool]int8) (map[bool]int8, error)       //`dubbo:"echoBool2ByteMap"`
	EchoBool2Int16Map  func(ctx context.Context, req map[bool]int16) (map[bool]int16, error)     //`dubbo:"echoBool2Int16Map"`
	EchoBool2Int32Map  func(ctx context.Context, req map[bool]int32) (map[bool]int32, error)     //`dubbo:"echoBool2Int32Map"`
	EchoBool2Int64Map  func(ctx context.Context, req map[bool]int64) (map[bool]int64, error)     //`dubbo:"echoBool2Int64Map"`
	EchoBool2FloatMap  func(ctx context.Context, req map[bool]float64) (map[bool]float64, error) //`dubbo:"echoBool2FloatMap"`
	EchoBool2DoubleMap func(ctx context.Context, req map[bool]float64) (map[bool]float64, error) //`dubbo:"echoBool2DoubleMap"`
	EchoBool2StringMap func(ctx context.Context, req map[bool]string) (map[bool]string, error)   //`dubbo:"echoBool2StringMap"`
	EchoBool2BinaryMap func(ctx context.Context, req map[bool][]byte) (map[bool][]byte, error)   //`dubbo:"echoBool2BinaryMap"`

	EchoMultiBool   func(ctx context.Context, baseReq bool, listReq []bool, mapReq map[bool]bool) (*EchoMultiBoolResponse, error)               //`dubbo:"echoMultiBool"`
	EchoMultiByte   func(ctx context.Context, baseReq int8, listReq []int8, mapReq map[int8]int8) (*EchoMultiByteResponse, error)               //`dubbo:"echoMultiByte"`
	EchoMultiInt16  func(ctx context.Context, baseReq int16, listReq []int16, mapReq map[int16]int16) (*EchoMultiInt16Response, error)          //`dubbo:"echoMultiInt16"`
	EchoMultiInt32  func(ctx context.Context, baseReq int32, listReq []int32, mapReq map[int32]int32) (*EchoMultiInt32Response, error)          //`dubbo:"echoMultiInt32"`
	EchoMultiInt64  func(ctx context.Context, baseReq int64, listReq []int64, mapReq map[int64]int64) (*EchoMultiInt64Response, error)          //`dubbo:"echoMultiInt64"`
	EchoMultiFloat  func(ctx context.Context, baseReq float64, listReq []float64, mapReq map[float64]float64) (*EchoMultiDoubleResponse, error) //`dubbo:"echoMultiFloat"`
	EchoMultiDouble func(ctx context.Context, baseReq float64, listReq []float64, mapReq map[float64]float64) (*EchoMultiDoubleResponse, error) //`dubbo:"echoMultiDouble"`
	EchoMultiString func(ctx context.Context, baseReq string, listReq []string, mapReq map[string]string) (*EchoMultiStringResponse, error)     //`dubbo:"echoMultiString"`

	// method name annotation
	EchoMethodA func(ctx context.Context, req bool) (string, error)              // `dubbo:"echoMethod"`
	EchoMethodB func(ctx context.Context, req int32) (string, error)             // `dubbo:"echoMethod"`
	EchoMethodC func(ctx context.Context, req int32) (string, error)             // `dubbo:"echoMethod"`
	EchoMethodD func(ctx context.Context, req1 bool, req2 int32) (string, error) // `dubbo:"echoMethod"`
}

UserProvider client interface

type UserProviderImpl

type UserProviderImpl struct{}

func (*UserProviderImpl) EchoBinary

func (u *UserProviderImpl) EchoBinary(ctx context.Context, req []byte) ([]byte, error)

func (*UserProviderImpl) EchoBinaryList

func (u *UserProviderImpl) EchoBinaryList(ctx context.Context, req [][]byte) ([][]byte, error)

func (*UserProviderImpl) EchoBool

func (u *UserProviderImpl) EchoBool(ctx context.Context, req bool) (bool, error)

func (*UserProviderImpl) EchoBool2BinaryListMap

func (u *UserProviderImpl) EchoBool2BinaryListMap(ctx context.Context, req map[bool][][]byte) (map[bool][][]byte, error)

func (*UserProviderImpl) EchoBool2BinaryMap

func (u *UserProviderImpl) EchoBool2BinaryMap(ctx context.Context, req map[bool][]byte) (map[bool][]byte, error)

func (*UserProviderImpl) EchoBool2BoolListMap

func (u *UserProviderImpl) EchoBool2BoolListMap(ctx context.Context, req map[bool][]bool) (map[bool][]bool, error)

func (*UserProviderImpl) EchoBool2BoolMap

func (u *UserProviderImpl) EchoBool2BoolMap(ctx context.Context, req map[bool]bool) (map[bool]bool, error)

func (*UserProviderImpl) EchoBool2ByteListMap

func (u *UserProviderImpl) EchoBool2ByteListMap(ctx context.Context, req map[bool][]int8) (map[bool][]int8, error)

func (*UserProviderImpl) EchoBool2ByteMap

func (u *UserProviderImpl) EchoBool2ByteMap(ctx context.Context, req map[bool]int8) (map[bool]int8, error)

func (*UserProviderImpl) EchoBool2DoubleListMap

func (u *UserProviderImpl) EchoBool2DoubleListMap(ctx context.Context, req map[bool][]float64) (map[bool][]float64, error)

func (*UserProviderImpl) EchoBool2DoubleMap

func (u *UserProviderImpl) EchoBool2DoubleMap(ctx context.Context, req map[bool]float64) (map[bool]float64, error)

func (*UserProviderImpl) EchoBool2FloatListMap

func (u *UserProviderImpl) EchoBool2FloatListMap(ctx context.Context, req map[bool][]float64) (map[bool][]float64, error)

func (*UserProviderImpl) EchoBool2FloatMap

func (u *UserProviderImpl) EchoBool2FloatMap(ctx context.Context, req map[bool]float64) (map[bool]float64, error)

func (*UserProviderImpl) EchoBool2Int16ListMap

func (u *UserProviderImpl) EchoBool2Int16ListMap(ctx context.Context, req map[bool][]int16) (map[bool][]int16, error)

func (*UserProviderImpl) EchoBool2Int16Map

func (u *UserProviderImpl) EchoBool2Int16Map(ctx context.Context, req map[bool]int16) (map[bool]int16, error)

func (*UserProviderImpl) EchoBool2Int32ListMap

func (u *UserProviderImpl) EchoBool2Int32ListMap(ctx context.Context, req map[bool][]int32) (map[bool][]int32, error)

func (*UserProviderImpl) EchoBool2Int32Map

func (u *UserProviderImpl) EchoBool2Int32Map(ctx context.Context, req map[bool]int32) (map[bool]int32, error)

func (*UserProviderImpl) EchoBool2Int64ListMap

func (u *UserProviderImpl) EchoBool2Int64ListMap(ctx context.Context, req map[bool][]int64) (map[bool][]int64, error)

func (*UserProviderImpl) EchoBool2Int64Map

func (u *UserProviderImpl) EchoBool2Int64Map(ctx context.Context, req map[bool]int64) (map[bool]int64, error)

func (*UserProviderImpl) EchoBool2StringListMap

func (u *UserProviderImpl) EchoBool2StringListMap(ctx context.Context, req map[bool][]string) (map[bool][]string, error)

func (*UserProviderImpl) EchoBool2StringMap

func (u *UserProviderImpl) EchoBool2StringMap(ctx context.Context, req map[bool]string) (map[bool]string, error)

func (*UserProviderImpl) EchoBoolList

func (u *UserProviderImpl) EchoBoolList(ctx context.Context, req []bool) ([]bool, error)

func (*UserProviderImpl) EchoByte

func (u *UserProviderImpl) EchoByte(ctx context.Context, req int8) (int8, error)

func (*UserProviderImpl) EchoByteList

func (u *UserProviderImpl) EchoByteList(ctx context.Context, req []int8) ([]int8, error)

func (*UserProviderImpl) EchoDouble

func (u *UserProviderImpl) EchoDouble(ctx context.Context, req float64) (float64, error)

func (*UserProviderImpl) EchoDoubleList

func (u *UserProviderImpl) EchoDoubleList(ctx context.Context, req []float64) ([]float64, error)

func (*UserProviderImpl) EchoFloat

func (u *UserProviderImpl) EchoFloat(ctx context.Context, req float64) (float64, error)

func (*UserProviderImpl) EchoFloatList

func (u *UserProviderImpl) EchoFloatList(ctx context.Context, req []float64) ([]float64, error)

func (*UserProviderImpl) EchoInt

func (u *UserProviderImpl) EchoInt(ctx context.Context, req int32) (int32, error)

func (*UserProviderImpl) EchoInt16

func (u *UserProviderImpl) EchoInt16(ctx context.Context, req int16) (int16, error)

func (*UserProviderImpl) EchoInt16List

func (u *UserProviderImpl) EchoInt16List(ctx context.Context, req []int16) ([]int16, error)

func (*UserProviderImpl) EchoInt32

func (u *UserProviderImpl) EchoInt32(ctx context.Context, req int32) (int32, error)

func (*UserProviderImpl) EchoInt32List

func (u *UserProviderImpl) EchoInt32List(ctx context.Context, req []int32) ([]int32, error)

func (*UserProviderImpl) EchoInt64

func (u *UserProviderImpl) EchoInt64(ctx context.Context, req int64) (int64, error)

func (*UserProviderImpl) EchoInt64List

func (u *UserProviderImpl) EchoInt64List(ctx context.Context, req []int64) ([]int64, error)

func (*UserProviderImpl) EchoMethodA

func (u *UserProviderImpl) EchoMethodA(ctx context.Context, req bool) (string, error)

func (*UserProviderImpl) EchoMethodB

func (u *UserProviderImpl) EchoMethodB(ctx context.Context, req int32) (string, error)

func (*UserProviderImpl) EchoMethodC

func (u *UserProviderImpl) EchoMethodC(ctx context.Context, req int32) (string, error)

func (*UserProviderImpl) EchoMethodD

func (u *UserProviderImpl) EchoMethodD(ctx context.Context, req1 bool, req2 int32) (string, error)

func (*UserProviderImpl) EchoMultiBool

func (u *UserProviderImpl) EchoMultiBool(ctx context.Context, baseReq bool, listReq []bool, mapReq map[bool]bool) (*EchoMultiBoolResponse, error)

func (*UserProviderImpl) EchoMultiByte

func (u *UserProviderImpl) EchoMultiByte(ctx context.Context, baseReq int8, listReq []int8, mapReq map[int8]int8) (*EchoMultiByteResponse, error)

func (*UserProviderImpl) EchoMultiDouble

func (u *UserProviderImpl) EchoMultiDouble(ctx context.Context, baseReq float64, listReq []float64, mapReq map[float64]float64) (*EchoMultiDoubleResponse, error)

func (*UserProviderImpl) EchoMultiFloat

func (u *UserProviderImpl) EchoMultiFloat(ctx context.Context, baseReq float64, listReq []float64, mapReq map[float64]float64) (*EchoMultiFloatResponse, error)

func (*UserProviderImpl) EchoMultiInt16

func (u *UserProviderImpl) EchoMultiInt16(ctx context.Context, baseReq int16, listReq []int16, mapReq map[int16]int16) (*EchoMultiInt16Response, error)

func (*UserProviderImpl) EchoMultiInt32

func (u *UserProviderImpl) EchoMultiInt32(ctx context.Context, baseReq int32, listReq []int32, mapReq map[int32]int32) (*EchoMultiInt32Response, error)

func (*UserProviderImpl) EchoMultiInt64

func (u *UserProviderImpl) EchoMultiInt64(ctx context.Context, baseReq int64, listReq []int64, mapReq map[int64]int64) (*EchoMultiInt64Response, error)

func (*UserProviderImpl) EchoMultiString

func (u *UserProviderImpl) EchoMultiString(ctx context.Context, baseReq string, listReq []string, mapReq map[string]string) (*EchoMultiStringResponse, error)

func (*UserProviderImpl) EchoString

func (u *UserProviderImpl) EchoString(ctx context.Context, req string) (string, error)

func (*UserProviderImpl) EchoStringList

func (u *UserProviderImpl) EchoStringList(ctx context.Context, req []string) ([]string, error)

func (*UserProviderImpl) GetUser

func (u *UserProviderImpl) GetUser(ctx context.Context, req int32) (*User, error)

GetUser implements the interface

type UserProviderImplV1

type UserProviderImplV1 struct{}

func (*UserProviderImplV1) EchoBool

func (u *UserProviderImplV1) EchoBool(ctx context.Context, req bool) (bool, error)

Jump to

Keyboard shortcuts

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