record

package
v0.0.0-...-3c4a4f3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NULL                = Type("")
	FriendMessage       = Type("FriendMessage")
	GroupMessage        = Type("GroupMessage")
	SendMessageResponse = Type("SendMessageResponse")
)

Variables

View Source
var (
	NotEnoughFieldsError = errors.New("insufficient field")
)

Functions

This section is empty.

Types

type Base

type Base interface {
	GetSyncID() string
	GetData() BaseData
	GetType() Type
}

func GetFriendMessageRecord

func GetFriendMessageRecord() Base

func GetGroupMessageRecord

func GetGroupMessageRecord() Base

func GetSendMessageResponse

func GetSendMessageResponse() Base

type BaseData

type BaseData interface {
	// contains filtered or unexported methods
}

type BaseDataImp

type BaseDataImp struct {
	Type         Type          `json:"type,omitempty"`
	MessageChain message.Chain `json:"messageChain,omitempty"`
}

func (*BaseDataImp) UnmarshalJSON

func (b *BaseDataImp) UnmarshalJSON(data []byte) error

type BaseImp

type BaseImp struct {
	SyncID string   `json:"syncId,omitempty"`
	Data   BaseData `json:"data,omitempty"`
}

func (*BaseImp) GetData

func (b *BaseImp) GetData() BaseData

func (*BaseImp) GetSyncID

func (b *BaseImp) GetSyncID() string

func (*BaseImp) GetType

func (b *BaseImp) GetType() Type

type FriendMessageData

type FriendMessageData struct {
	BaseDataImp
	// contains filtered or unexported fields
}

func (*FriendMessageData) UnmarshalJSON

func (f *FriendMessageData) UnmarshalJSON(data []byte) error

type GroupMessageData

type GroupMessageData struct {
	BaseDataImp
	// contains filtered or unexported fields
}

func (*GroupMessageData) UnmarshalJSON

func (g *GroupMessageData) UnmarshalJSON(data []byte) error

type SendMessageResponseData

type SendMessageResponseData struct {
	Code      int    `json:"code"`
	Msg       string `json:"msg"`
	MessageId int    `json:"messageId"`
}

type Type

type Type string

func ConvertToType

func ConvertToType(rawType string) Type

Jump to

Keyboard shortcuts

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