penguin

package module
v0.0.0-...-d9311aa Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

README

penguin

Open Source RPC-based Penguin Client in Go.

Download

GitHub Releases Page

The latest releases and changelog are avaliable via this link.

Nightly Build Artifacts
Click to expand!
Platform Link
darwin/amd64 penguin-all-darwin-amd64.zip
darwin/amd64v3 penguin-all-darwin-amd64v3.zip
darwin/arm64 penguin-all-darwin-arm64.zip
freebsd/amd64 penguin-all-freebsd-amd64.zip
freebsd/amd64v3 penguin-all-freebsd-amd64v3.zip
freebsd/arm64 penguin-all-freebsd-arm64.zip
linux/386 penguin-all-linux-386.zip
linux/amd64 penguin-all-linux-amd64.zip
linux/amd64v3 penguin-all-linux-amd64v3.zip
linux/arm64 penguin-all-linux-arm64.zip
linux/arm7 penguin-all-linux-arm7.zip
windows/386 penguin-all-windows-386.zip
windows/amd64 penguin-all-windows-amd64.zip
windows/amd64v3 penguin-all-windows-amd64v3.zip
windows/arm64 penguin-all-windows-arm64.zip
windows/arm7 penguin-all-windows-arm7.zip

License

This project is licensed under the Apache License, Version 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       int64       `json:"id"`
	Type     AccountType `json:"type"`
	Username string      `json:"username,omitempty"`
	Photo    string      `json:"photo,omitempty"`
}

type AccountType

type AccountType string
const (
	AccountTypeDefault    AccountType = "DEFAULT"
	AccountTypeAnonymous  AccountType = "ANONYMOUS"
	AccountTypeChannel    AccountType = "CHANNEL"
	AccountTypeChannelBot AccountType = "CHANNEL_BOT"
)

type Animation

type Animation struct{}

type Audio

type Audio struct{}

type Chat

type Chat struct {
	ID      int64      `json:"id"`
	Type    ChatType   `json:"type"`
	Title   string     `json:"title,omitempty"`
	Photo   *ChatPhoto `json:"photo,omitempty"`
	Display string     `json:"display,omitempty"`

	PinnedMessage *Message `json:"pinned_message,omitempty"`

	Chat    *Chat `json:"chat,omitempty"`
	User    *User `json:"user,omitempty"`
	Channel *Chat `json:"channel,omitempty"`
}

type ChatPhoto

type ChatPhoto struct {
	FileID string `json:"file_id"`
}

type ChatType

type ChatType string
const (
	// default
	ChatTypeDiscuss        ChatType = "DISCUSS"
	ChatTypeDiscussPrivate ChatType = "DISCUSS_PRIVATE"
	ChatTypeGroup          ChatType = "GROUP"
	ChatTypeGroupPrivate   ChatType = "GROUP_PRIVATE"
	ChatTypePrivate        ChatType = "PRIVATE"

	// channel
	ChatTypeChannel        ChatType = "CHANNEL"
	ChatTypeChannelPrivate ChatType = "CHANNEL_PRIVATE"

	// channel room
	ChatTypeRoomText    ChatType = "ROOM_TEXT"
	ChatTypeRoomVoice   ChatType = "ROOM_VOICE"
	ChatTypeRoomGroup   ChatType = "ROOM_GROUP"
	ChatTypeRoomLive    ChatType = "ROOM_LIVE"
	ChatTypeRoomApp     ChatType = "ROOM_APP"
	ChatTypeRoomForum   ChatType = "ROOM_FORUM"
	ChatTypeRoomPrivate ChatType = "ROOM_PRIVATE"
)

type Contact

type Contact struct {
	Account *Account `json:"account"`
	Display string   `json:"display,omitempty"`
}

type Dice

type Dice struct {
	Emoji string `json:"emoji"`
	Value int8   `json:"value"`
}

type Digest

type Digest struct {
	MD5    []byte `json:"md5,omitempty"`
	SHA1   []byte `json:"sha1,omitempty"`
	SHA256 []byte `json:"sha256,omitempty"`
	SHA512 []byte `json:"sha512,omitempty"`
}

type Document

type Document struct{}

type Message

type Message struct {
	MessageID int64            `json:"message_id"`
	Chat      *Chat            `json:"chat"`
	From      *User            `json:"from,omitempty"`
	Forward   *Message         `json:"forward,omitempty"`
	ReplyTo   *Message         `json:"reply_to,omitempty"`
	Time      int64            `json:"time"`
	EditTime  int64            `json:"edit_time,omitempty"`
	Text      string           `json:"text,omitempty"`
	Entities  []*MessageEntity `json:"entities,omitempty"`

	Animation *Animation `json:"animation,omitempty"`
	Audio     *Audio     `json:"audio,omitempty"`
	Document  *Document  `json:"document,omitempty"`
	Photo     *Photo     `json:"photo,omitempty"`
	Sticker   *Sticker   `json:"sticker,omitempty"`
	Video     *Video     `json:"video,omitempty"`
	Voice     *Voice     `json:"voice,omitempty"`
	Contact   *Contact   `json:"contact,omitempty"`
	Dice      *Dice      `json:"dice,omitempty"`
	Poll      *Poll      `json:"poll,omitempty"`
	Venue     *Venue     `json:"venue,omitempty"`

	NewChatUsers []*User `json:"new_chat_users,omitempty"`
	LeftChatUser *User   `json:"left_chat_user,omitempty"`

	NewChatTitle string `json:"new_chat_title,omitempty"`
	NewChatPhoto *Photo `json:"new_chat_photo,omitempty"`

	PinnedMessage *Message `json:"pinned_message,omitempty"`
}

type MessageEntity

type MessageEntity struct {
	Type   string `json:"type"`
	Offset int64  `json:"offset"`
	Length int64  `json:"length"`
	URL    string `json:"url,omitempty"`
	User   *User  `json:"user,omitempty"`
}

type Photo

type Photo struct {
	ID     int64   `json:"id"`
	Path   string  `json:"path"`
	Name   string  `json:"name"`
	Size   int64   `json:"size"`
	Width  int     `json:"width"`
	Height int     `json:"height"`
	Digest *Digest `json:"digest,omitempty"`
}

type Poll

type Poll struct {
	ID   int64  `json:"id"`
	Type string `json:"type"`
	Text string `json:"text"`

	Multiple bool          `json:"multiple"`
	Options  []*PollOption `json:"options"`

	Count int64 `json:"count"`

	IsAnonymous bool `json:"is_anonymous"`
	IsClosed    bool `json:"is_closed"`
}

type PollOption

type PollOption struct {
	Text  string `json:"text"`
	Count int64  `json:"count"`

	Users []*User `json:"users,omitempty"`
}

type Role

type Role struct {
	ID    int64  `json:"id"`
	Color uint32 `json:"color,omitempty"`
	Hoist bool   `json:"hoist,omitempty"`
}

type Sticker

type Sticker struct{}

type User

type User struct {
	Account *Account `json:"account"`
	Display string   `json:"display,omitempty"`
}

type Venue

type Venue struct{}

type Video

type Video struct {
	ID     int64   `json:"id"`
	UUID   string  `json:"uuid"`
	Name   string  `json:"name"`
	Size   int64   `json:"size"`
	Digest *Digest `json:"digest,omitempty"`

	Thumbnail *Photo `json:"thumbnail,omitempty"`
}

type Voice

type Voice struct {
	ID     int64   `json:"id"`
	Path   string  `json:"path"`
	Name   string  `json:"name"`
	Size   int64   `json:"size"`
	Digest *Digest `json:"digest,omitempty"`
}

Jump to

Keyboard shortcuts

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