models

package
v0.0.0-...-1a912f8 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModels

func GetModels() string

Types

type Chat

type Chat struct {
	ID                      int64
	Name                    string
	AddrUsers               []string
	MessageBlockID          int64
	LastSender, LastMessage string
}

type ChatSettings

type ChatSettings struct {
	Name string `json:"name"`
}

type CreateDHData

type CreateDHData struct {
	CommonName   string
	Organization string
	DNSNames1    string //wiki
	DNSNames2    string //192.168.0.2
	Type         string
}

type EncryptedMessage

type EncryptedMessage struct {
	Type string `json:"mtype"`
	Data string `json:"data"`
	IV   string `json:"iv"`
	Key  string `json:"key"`
}

type File

type File struct {
	ID        int64   `json:"id"`
	AuthorID  int64   `json:"author_id"`
	ChatID    int64   `json:"chat_id"`
	Name      string  `json:"name"`
	Path      string  `json:"path"`
	RatioSize float64 `json:"ratio"`
	Size      int64   `json:"size"`
	Duration  int64   `json:"duration"`
}

type FolkChatsInfo

type FolkChatsInfo struct {
	ID         int64  `json:"id"`
	Login      string `json:"login"`
	Name       string `json:"name"`
	DeleteLast int64  `json:"delete_last"`
	Ban        bool   `json:"ban"`
}

type ForceMsgToUser

type ForceMsgToUser struct {
	UserID int64
	Msg    NewMessageToUser
}

type Message

type Message struct {
	AddrAuthor string
	Content    string
	Type       string
	ChatID     float64
}

type MessageBlock

type MessageBlock struct {
	ChatID   int64
	Messages []Message
}

type MessageCommand

type MessageCommand int
const (
	MessageCommandNull                  MessageCommand = iota
	MessageCommandUserInsertedToChat                   // 1
	MessageCommandUserCreatedChat                      // 2
	MessageCommandUserInsertedToChannel                // 3
	MessageCommandUserCreatedChannel                   // 4
	MessageCommandUserInsertedToDialog                 // 5
	MessageCommandUserCreatedDialog                    // 6
	MessageCommandUserLeaveChat                        // 7
	MessageCommandUserReturnsToChat                    // 8
	MessageCommandUserWasBanned                        // 9
	MessageCommandUserWasUnbanned                      // 10
)

type MessageContent

type MessageContent struct {
	Message   string  `json:"content"`
	Documents []int64 `json:"documents"`
	Type      int     `json:"type"`
	Command   int     `json:"command,integer"`
}

type MessageContentToUser

type MessageContentToUser struct {
	Message   string  `json:"content"`
	Documents *[]File `json:"documents"`
	Type      int     `json:"type"`
	Command   int     `json:"command,integer"`
}

type MessageType

type MessageType int

MessageType - type for message type's aliases

const (
	//SystemMessageType - system message alias
	SystemMessageType MessageType = 1
	//UserMessageType - user message alias
	UserMessageType MessageType = 0
)

type MiddleWareMessage

type MiddleWareMessage struct {
	ID int64
	// contains filtered or unexported fields
}

type NewMessageToUser

type NewMessageToUser struct {
	Type        string                `json:"mtype"`
	ID          int64                 `json:"id"`
	ChatID      int64                 `json:"chat_id"`
	Content     *MessageContentToUser `json:"message"`
	AuthorID    int64                 `json:"author_id"`
	AuthorName  string                `json:"author_name"`
	AuthorLogin string                `json:"author_login"`
	Time        int64                 `json:"time"`
}

type User

type User struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Login    string `json:"login"`
	Language string `json:"language"`
	// contains filtered or unexported fields
}

type UserChatInfo

type UserChatInfo struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
	Type int    `json:"type"`
	//Addr_users []string
	LastSender string `json:"last_sender"`
	AdminID    int64  `json:"admin_id"`
	//Moders_ids []float64 `json:"moderators_ids"`
	LastMessage     *MessageContent `json:"last_message"`
	LastMessageTime int64           `json:"last_message_time"`
	View            int             `json:"view"`
	Deleted         bool            `json:"deleted"`
	Banned          bool            `json:"banned"`
	Online          int64           `json:"online"`
}

type UserSettings

type UserSettings struct {
	Name     string
	Language string
}

Jump to

Keyboard shortcuts

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