models

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgTypeText        = "text"
	MsgTypePost        = "post"
	MsgTypeSticker     = "sticker"
	MsgTypeLocation    = "location"
	MsgTypeLive        = "live"
	MsgTypeContact     = "contact"
	MsgTypeButtongroup = "buttongroup"
	MsgTypeAppCard     = "appcard"
)
View Source
const (
	SuccessCode    = 0
	CodeMsgExisted = 101002
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCard

type AppCard struct {
	IconURL     string `json:"icon_url"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Action      string `json:"action"`
	MessageID   string `json:"message_id,omitempty"`
}

func (AppCard) Body

func (t AppCard) Body() interface{}

func (AppCard) Type

func (t AppCard) Type() string

type ButtongGroup

type ButtongGroup struct {
	Buttons   []*MsgButton `json:"buttons"`
	MessageID string       `json:"message_id,omitempty"`
}

func (ButtongGroup) Body

func (t ButtongGroup) Body() interface{}

func (ButtongGroup) Type

func (t ButtongGroup) Type() string

type Contact

type Contact struct {
	UserID    string `json:"user_id"`
	MessageID string `json:"message_id,omitempty"`
}

func (Contact) Body

func (t Contact) Body() interface{}

func (Contact) Type

func (t Contact) Type() string

type Err added in v1.0.10

type Err interface {
	Code() int
	Message() string
	IsSuccessful() bool
}

func NewErr added in v1.0.10

func NewErr(code int, message string) Err

func NewErrWithBytes added in v1.0.10

func NewErrWithBytes(bytes []byte) Err

type IMixinMsg

type IMixinMsg interface {
	Type() string
	Body() interface{}
}

type Live

type Live struct {
	Width     decimal.Decimal `json:"width"`
	Height    decimal.Decimal `json:"height"`
	ThumbURL  string          `json:"thumb_url"`
	URL       string          `json:"url"`
	MessageID string          `json:"message_id,omitempty"`
}

func (Live) Body

func (t Live) Body() interface{}

func (Live) Type

func (t Live) Type() string

type Location

type Location struct {
	Longitude decimal.Decimal `json:"longitude"`
	Latitude  decimal.Decimal `json:"latitude"`
	Name      string          `json:"name"`
	Address   string          `json:"address"`
	MessageID string          `json:"message_id,omitempty"`
}

func (Location) Body

func (t Location) Body() interface{}

func (Location) Type

func (t Location) Type() string

type MixinMsgWrapper

type MixinMsgWrapper struct {
	Type string      `json:"type"`
	Body interface{} `json:"body"`
}

type MsgButton

type MsgButton struct {
	Label  string `json:"label"`
	Color  string `json:"color"`
	Action string `json:"action"`
}

type OkResponse

type OkResponse struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

type Post

type Post struct {
	Text      string `json:"text"`
	MessageID string `json:"message_id,omitempty"`
}

func (Post) Body

func (t Post) Body() interface{}

func (Post) Type

func (t Post) Type() string

type Sticker

type Sticker struct {
	Name      string `json:"name"`
	AlbumID   string `json:"album_id"`
	MessageID string `json:"message_id,omitempty"`
}

func (Sticker) Body

func (t Sticker) Body() interface{}

func (Sticker) Type

func (t Sticker) Type() string

type Text

type Text struct {
	Text      string `json:"text"`
	MessageID string `json:"message_id,omitempty"`
}

func (Text) Body

func (t Text) Body() interface{}

func (Text) Type

func (t Text) Type() string

Jump to

Keyboard shortcuts

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