Documentation ¶
Index ¶
- Constants
- func Code(servicePath string) uint16
- func ConvertInterface2Bool(v interface{}) (bool, error)
- func ConvertInterface2Int(v interface{}) (int, error)
- func ConvertInterface2Int16(v interface{}) (int16, error)
- func ConvertInterface2Int32(v interface{}) (int32, error)
- func ConvertInterface2Int32Array(v interface{}) ([]int32, error)
- func ConvertInterface2Int64(v interface{}) (int64, error)
- func ConvertInterface2Int8(v interface{}) (int8, error)
- func ConvertInterface2String(v interface{}) (string, error)
- func ConvertString2Int(value string) (iValue int, err error)
- func ConvertString2Int16(value string) (iValue int16, err error)
- func ConvertString2Int32(value string) (iValue int32, err error)
- func ConvertString2Int64(value string) (iValue int64, err error)
- func ConvertString2Int8(value string) (iValue int8, err error)
- func ConvertTime2Int64(value string) (iValue int64, err error)
- func DispatchByCode(serviceCode int32, data ...interface{}) error
- func DispatchByPath(servicePath string, data ...interface{}) error
- func HandlerType(servicePath string) []reflect.Type
- func Init(checker IHandleChecker)
- func Path(serviceCode uint16) string
- func Register(receiver interface{})
- type Attr
- func (attr *Attr) Copy(srcAttr IAttr)
- func (attr *Attr) CopyFromMap(newAttr map[string]interface{})
- func (attr *Attr) CopyToMap() map[string]interface{}
- func (attr *Attr) Get(key string) (value interface{})
- func (attr *Attr) GetBool(key string) bool
- func (attr *Attr) GetInt(key string) int
- func (attr *Attr) GetInt16(key string) int16
- func (attr *Attr) GetInt32(key string) int32
- func (attr *Attr) GetInt64(key string) int64
- func (attr *Attr) GetInt8(key string) int8
- func (attr *Attr) GetString(key string) string
- func (attr *Attr) Set(key string, value interface{})
- type IAttr
- type IChannelContext
- type IHandleChecker
- type IReqContext
- type IRouteMapper
- type ISerializer
- type IServiceRequest
- type IServiceResponse
- type Request
Constants ¶
View Source
const (
PreStringForRouteMethod string = "RouteFor"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertInterface2Bool ¶
func ConvertInterface2Int ¶
func ConvertInterface2Int16 ¶
func ConvertInterface2Int32 ¶
func ConvertInterface2Int64 ¶
func ConvertInterface2Int8 ¶
func ConvertInterface2String ¶
func ConvertString2Int ¶
func ConvertString2Int16 ¶
func ConvertString2Int32 ¶
func ConvertString2Int64 ¶
func ConvertString2Int8 ¶
func ConvertTime2Int64 ¶
func DispatchByCode ¶
Dispatch dispatch message to a service handler
func DispatchByPath ¶
Dispatch dispatch message to a service handler
func HandlerType ¶
HandlerType find the input-params type
func Init ¶
func Init(checker IHandleChecker)
Types ¶
type Attr ¶
type Attr struct {
// contains filtered or unexported fields
}
func (*Attr) CopyFromMap ¶
type IAttr ¶
type IAttr interface { Get(key string) (value interface{}) GetBool(key string) bool GetInt8(key string) (value int8) GetInt16(key string) (value int16) GetInt32(key string) (value int32) GetInt64(key string) (value int64) GetInt(key string) (value int) GetString(key string) (value string) Set(key string, value interface{}) CopyToMap() map[string]interface{} CopyFromMap(newAttr map[string]interface{}) Copy(newAttr IAttr) }
type IChannelContext ¶
type IHandleChecker ¶
type IReqContext ¶
type IReqContext IAttr
type IRouteMapper ¶
type ISerializer ¶
type IServiceRequest ¶
type IServiceRequest interface { ChannelContext() IChannelContext ReqContext() IReqContext }
func NewSessionRequest ¶
func NewSessionRequest(channelContext IChannelContext, reqContext IReqContext) IServiceRequest
type IServiceResponse ¶
type IServiceResponse interface {
Write(interface{}, ISerializer)
}
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) ChannelContext ¶
func (req *Request) ChannelContext() IChannelContext
func (*Request) ReqContext ¶
func (req *Request) ReqContext() IReqContext
Click to show internal directories.
Click to hide internal directories.