Documentation
¶
Index ¶
- type CommonExtendParams
- func (op CommonExtendParams) ExtendParamByBool(k string, def ...bool) bool
- func (op CommonExtendParams) ExtendParamByFloat(k string, def ...float64) float64
- func (op CommonExtendParams) ExtendParamByInt(k string, def ...int) int
- func (op CommonExtendParams) ExtendParamByInt64(k string, def ...int64) int64
- func (op CommonExtendParams) ExtendParamByString(k string, def ...string) string
- func (op CommonExtendParams) ExtendParamValue(key string, def ...string) string
- func (op CommonExtendParams) Get(key string) string
- func (op CommonExtendParams) Set(key string, value string)
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonExtendParams ¶
func (CommonExtendParams) ExtendParamByBool ¶
func (op CommonExtendParams) ExtendParamByBool(k string, def ...bool) bool
ExtendParamByBool 返回extendParam指定k的bool类型值
func (CommonExtendParams) ExtendParamByFloat ¶
func (op CommonExtendParams) ExtendParamByFloat(k string, def ...float64) float64
ExtendParamByFloat 返回extendParam指定k的float类型值
func (CommonExtendParams) ExtendParamByInt ¶
func (op CommonExtendParams) ExtendParamByInt(k string, def ...int) int
ExtendParamByInt 返回extendParam指定k的int类型值
func (CommonExtendParams) ExtendParamByInt64 ¶
func (op CommonExtendParams) ExtendParamByInt64(k string, def ...int64) int64
ExtendParamByInt64 返回extendParam指定k的int类型值
func (CommonExtendParams) ExtendParamByString ¶
func (op CommonExtendParams) ExtendParamByString(k string, def ...string) string
ExtendParamByString 返回extendParam指定k的string类型值
func (CommonExtendParams) ExtendParamValue ¶
func (op CommonExtendParams) ExtendParamValue(key string, def ...string) string
func (CommonExtendParams) Get ¶ added in v1.0.5
func (op CommonExtendParams) Get(key string) string
func (CommonExtendParams) Set ¶ added in v1.0.5
func (op CommonExtendParams) Set(key string, value string)
type Message ¶ added in v1.0.5
type Message[T interface{}] struct {
// UUID is a unique identifier of the message.
UUID string
// Metadata contains the message metadata.
ExtendParams CommonExtendParams
// Payload is the message's payload.
Payload []byte
PayloadData T
}
func NewMessage ¶ added in v1.0.5
func NewMessage[T interface{}]() *Message[T]
Click to show internal directories.
Click to hide internal directories.