callback

package
v0.0.0-...-a9479ba Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgResponseToBinds

func NewMsgResponseToBinds(responses []MessageNewResponse) []*model.Bind

Types

type AttachmentNew

type AttachmentNew struct {
	HasSpoiler bool   `json:"has_spoiler,omitempty"`
	Type       int    `json:"type,omitempty"`
	Url        string `json:"url,omitempty"`
	WaitUpload bool   `json:"wait_upload,omitempty"` // false - ждать ивента о том что файл стал доступен по ссылке
}

type Body

type Body struct {
	MessageNew *MessageNew `json:"message_new,omitempty"`
}

type Client

type Client interface {
	MessageNew(c []MessageNew) ([]*model.Bind, error)
}

func NewClient

func NewClient() Client

type ForwardNew

type ForwardNew struct {
	ID          int             `json:"id,omitempty"`
	LocalID     string          `json:"local_id,omitempty"`
	Username    string          `json:"username,omitempty"`
	Text        string          `json:"text,omitempty"`
	CreateDate  string          `json:"create_date,omitempty"`
	Attachments []AttachmentNew `json:"attachments,omitempty"`
}

type MessageNew

type MessageNew struct {
	ID          int             `json:"id,omitempty"`
	IsSilent    bool            `json:"is_silent,omitempty"`
	Reply       int             `json:"reply,omitempty"`
	ReplyLocal  string          `json:"reply_local,omitempty"`
	Username    string          `json:"username,omitempty"`
	Text        string          `json:"text,omitempty"`
	Attachments []AttachmentNew `json:"attachments,omitempty"`
	Forwards    []ForwardNew    `json:"forwards,omitempty"`

	App model.Application `json:"-"`
}

type MessageNewRequest

type MessageNewRequest struct {
	MessageNew
}

type MessageNewResponse

type MessageNewResponse struct {
	LocalID string `json:"local_id,omitempty"`
	MsgID   int    `json:"msg_id,omitempty"`
	AppID   int    `json:"app_id,omitempty"`
}

Jump to

Keyboard shortcuts

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