event

package
v0.0.0-...-53cc220 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	ChatID string   `json:"chatId"`
	Type   ChatKind `json:"type"`
	Title  string   `json:"title"`
}

func (Chat) MarshalEasyJSON

func (v Chat) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Chat) MarshalJSON

func (v Chat) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Chat) UnmarshalEasyJSON

func (v *Chat) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Chat) UnmarshalJSON

func (v *Chat) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ChatKind

type ChatKind string
const (
	ChatKindChannel ChatKind = "channel"
	ChatKindGroup   ChatKind = "group"
)

type Event

type Event struct {
	EventID int             `json:"eventId"`
	Type    Kind            `json:"type"`
	Payload json.RawMessage `json:"payload"`
}

func (Event) MarshalEasyJSON

func (v Event) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Event) MarshalJSON

func (v Event) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Event) UnmarshalEasyJSON

func (v *Event) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Event) UnmarshalJSON

func (v *Event) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type File

type File struct {
	FileID  string   `json:"fileId"`
	Type    FileType `json:"type"`
	Caption string   `json:"caption"`
}

func (File) MarshalEasyJSON

func (v File) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (File) MarshalJSON

func (v File) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*File) UnmarshalEasyJSON

func (v *File) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*File) UnmarshalJSON

func (v *File) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FilePayload

type FilePayload struct {
	File
}

func (FilePayload) MarshalEasyJSON

func (v FilePayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FilePayload) MarshalJSON

func (v FilePayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FilePayload) UnmarshalEasyJSON

func (v *FilePayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FilePayload) UnmarshalJSON

func (v *FilePayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FileType

type FileType string
const (
	FileTypeImage FileType = "image"
	FileTypeAudio FileType = "audio"
	FileTypeVideo FileType = "video"
)

type ForwardPayload

type ForwardPayload struct {
	Message Message `json:"message"`
}

func (ForwardPayload) MarshalEasyJSON

func (v ForwardPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ForwardPayload) MarshalJSON

func (v ForwardPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ForwardPayload) UnmarshalEasyJSON

func (v *ForwardPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ForwardPayload) UnmarshalJSON

func (v *ForwardPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Kind

type Kind string

Kind represents event kind

const (
	KindNewMessage      Kind = "newMessage"
	KindEditedMessage   Kind = "editedMessage"
	KindDeletedMessage  Kind = "deletedMessage"
	KindPinnedMessage   Kind = "pinnedMessage"
	KindUnpinnedMessage Kind = "unpinnedMessage"
	KindNewChatMember   Kind = "newChatMembers"
	KindLeftChatMembers Kind = "leftChatMembers"
)

type LeftChatMembersPayload

type LeftChatMembersPayload struct {
	Chat        Chat   `json:"chat"`
	LeftMembers []User `json:"leftMembers"`
	RemovedBy   User   `json:"removedBy"`
}

func (LeftChatMembersPayload) MarshalEasyJSON

func (v LeftChatMembersPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LeftChatMembersPayload) MarshalJSON

func (v LeftChatMembersPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LeftChatMembersPayload) UnmarshalEasyJSON

func (v *LeftChatMembersPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LeftChatMembersPayload) UnmarshalJSON

func (v *LeftChatMembersPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MentionPayload

type MentionPayload struct {
	User
}

func (MentionPayload) MarshalEasyJSON

func (v MentionPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MentionPayload) MarshalJSON

func (v MentionPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MentionPayload) UnmarshalEasyJSON

func (v *MentionPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MentionPayload) UnmarshalJSON

func (v *MentionPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Message

type Message struct {
	MessageID string `json:"msgId"`
	From      User   `json:"from"`
	Text      string `json:"text"`
	Timestamp uint64 `json:"timestamp"`
}

type MessageDeletePayload

type MessageDeletePayload struct {
	MessageID string `json:"msgId"`
	Chat      Chat   `json:"chat"`
	Timestamp uint64 `json:"timestamp"`
}

func (MessageDeletePayload) MarshalEasyJSON

func (v MessageDeletePayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessageDeletePayload) MarshalJSON

func (v MessageDeletePayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessageDeletePayload) UnmarshalEasyJSON

func (v *MessageDeletePayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessageDeletePayload) UnmarshalJSON

func (v *MessageDeletePayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessageEditPayload

type MessageEditPayload struct {
	MessageID string `json:"msgId"`
	Chat      Chat   `json:"chat"`
	From      User   `json:"from"`
	Timestamp uint64 `json:"timestamp"`
	Text      string `json:"text"`
	EditedAt  uint64 `json:"editedTimestamp"`
}

func (MessageEditPayload) MarshalEasyJSON

func (v MessageEditPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessageEditPayload) MarshalJSON

func (v MessageEditPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessageEditPayload) UnmarshalEasyJSON

func (v *MessageEditPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessageEditPayload) UnmarshalJSON

func (v *MessageEditPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePart

type MessagePart struct {
	Type    MessagePartType `json:"type"`
	Payload json.RawMessage `json:"payload"`
}

func (MessagePart) MarshalEasyJSON

func (v MessagePart) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePart) MarshalJSON

func (v MessagePart) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePart) UnmarshalEasyJSON

func (v *MessagePart) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePart) UnmarshalJSON

func (v *MessagePart) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartFile

type MessagePartFile struct {
	File
}

func (MessagePartFile) MarshalEasyJSON

func (v MessagePartFile) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartFile) MarshalJSON

func (v MessagePartFile) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartFile) UnmarshalEasyJSON

func (v *MessagePartFile) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartFile) UnmarshalJSON

func (v *MessagePartFile) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartForward

type MessagePartForward struct {
	Message Message `json:"message"`
}

func (MessagePartForward) MarshalEasyJSON

func (v MessagePartForward) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartForward) MarshalJSON

func (v MessagePartForward) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartForward) UnmarshalEasyJSON

func (v *MessagePartForward) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartForward) UnmarshalJSON

func (v *MessagePartForward) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartMention

type MessagePartMention struct {
	User
}

func (MessagePartMention) MarshalEasyJSON

func (v MessagePartMention) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartMention) MarshalJSON

func (v MessagePartMention) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartMention) UnmarshalEasyJSON

func (v *MessagePartMention) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartMention) UnmarshalJSON

func (v *MessagePartMention) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartMessage

type MessagePartMessage struct {
	From      User   `json:"from"`
	MessageID string `json:"msgId"`
	Text      string `json:"text"`
	Timestamp uint64 `json:"timestamp"`
}

func (MessagePartMessage) MarshalEasyJSON

func (v MessagePartMessage) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartMessage) MarshalJSON

func (v MessagePartMessage) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartMessage) UnmarshalEasyJSON

func (v *MessagePartMessage) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartMessage) UnmarshalJSON

func (v *MessagePartMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartReply

type MessagePartReply struct {
	Message Message `json:"message"`
}

func (MessagePartReply) MarshalEasyJSON

func (v MessagePartReply) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartReply) MarshalJSON

func (v MessagePartReply) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartReply) UnmarshalEasyJSON

func (v *MessagePartReply) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartReply) UnmarshalJSON

func (v *MessagePartReply) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartSticker

type MessagePartSticker struct {
	FileID string `json:"fileId"`
}

func (MessagePartSticker) MarshalEasyJSON

func (v MessagePartSticker) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartSticker) MarshalJSON

func (v MessagePartSticker) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartSticker) UnmarshalEasyJSON

func (v *MessagePartSticker) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartSticker) UnmarshalJSON

func (v *MessagePartSticker) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePartType

type MessagePartType string
const (
	PartTypeSticker MessagePartType = "sticker"
	PartTypeMention MessagePartType = "mention"
	PartTypeVoice   MessagePartType = "voice"
	PartTypeFile    MessagePartType = "file"
	PartTypeForward MessagePartType = "forward"
	PartTypeReply   MessagePartType = "reply"
)

type MessagePartVoice

type MessagePartVoice struct {
	FileID string `json:"fileId"`
}

func (MessagePartVoice) MarshalEasyJSON

func (v MessagePartVoice) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePartVoice) MarshalJSON

func (v MessagePartVoice) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePartVoice) UnmarshalEasyJSON

func (v *MessagePartVoice) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePartVoice) UnmarshalJSON

func (v *MessagePartVoice) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessagePinPayload

type MessagePinPayload struct {
	MessageID string `json:"msgId"`
	Chat      Chat   `json:"chat"`
	From      User   `json:"from"`
	Timestamp uint64 `json:"timestamp"`
	Text      string `json:"text"`
}

func (MessagePinPayload) MarshalEasyJSON

func (v MessagePinPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessagePinPayload) MarshalJSON

func (v MessagePinPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessagePinPayload) UnmarshalEasyJSON

func (v *MessagePinPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessagePinPayload) UnmarshalJSON

func (v *MessagePinPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MessageUnpinPayload

type MessageUnpinPayload struct {
	MessageID string `json:"msgId"`
	Chat      Chat   `json:"chat"`
	Timestamp uint64 `json:"timestamp"`
}

func (MessageUnpinPayload) MarshalEasyJSON

func (v MessageUnpinPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MessageUnpinPayload) MarshalJSON

func (v MessageUnpinPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MessageUnpinPayload) UnmarshalEasyJSON

func (v *MessageUnpinPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MessageUnpinPayload) UnmarshalJSON

func (v *MessageUnpinPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type NewChatMembersPayload

type NewChatMembersPayload struct {
	MessageID string `json:"msgId"`
	Chat      Chat   `json:"chat"`
	Timestamp uint64 `json:"timestamp"`
}

func (NewChatMembersPayload) MarshalEasyJSON

func (v NewChatMembersPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewChatMembersPayload) MarshalJSON

func (v NewChatMembersPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*NewChatMembersPayload) UnmarshalEasyJSON

func (v *NewChatMembersPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewChatMembersPayload) UnmarshalJSON

func (v *NewChatMembersPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type NewMessagePayload

type NewMessagePayload struct {
	MessageID string        `json:"msgId"`
	Chat      Chat          `json:"chat"`
	From      User          `json:"from"`
	Timestamp uint64        `json:"timestamp"`
	Text      string        `json:"text"`
	Parts     []MessagePart `json:"parts"`
}

func (NewMessagePayload) MarshalEasyJSON

func (v NewMessagePayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (NewMessagePayload) MarshalJSON

func (v NewMessagePayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*NewMessagePayload) UnmarshalEasyJSON

func (v *NewMessagePayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NewMessagePayload) UnmarshalJSON

func (v *NewMessagePayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ReplyPayload

type ReplyPayload struct {
	Message Message `json:"message"`
}

func (ReplyPayload) MarshalEasyJSON

func (v ReplyPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ReplyPayload) MarshalJSON

func (v ReplyPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ReplyPayload) UnmarshalEasyJSON

func (v *ReplyPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ReplyPayload) UnmarshalJSON

func (v *ReplyPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type StickerPayload

type StickerPayload struct {
	FileID string `json:"fileId"`
}

func (StickerPayload) MarshalEasyJSON

func (v StickerPayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (StickerPayload) MarshalJSON

func (v StickerPayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*StickerPayload) UnmarshalEasyJSON

func (v *StickerPayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StickerPayload) UnmarshalJSON

func (v *StickerPayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type User

type User struct {
	UserID    string `json:"userId"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

func (User) MarshalEasyJSON

func (v User) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (User) MarshalJSON

func (v User) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*User) UnmarshalEasyJSON

func (v *User) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*User) UnmarshalJSON

func (v *User) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type VoicePayload

type VoicePayload struct {
	FileID string `json:"fileId"`
}

func (VoicePayload) MarshalEasyJSON

func (v VoicePayload) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (VoicePayload) MarshalJSON

func (v VoicePayload) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*VoicePayload) UnmarshalEasyJSON

func (v *VoicePayload) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*VoicePayload) UnmarshalJSON

func (v *VoicePayload) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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