queried

package
v0.0.0-...-897d125 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyRoomInfo = RoomInfo{
	Members: []RoomMemberProfile{},
}

EmptyRoomInfo is RoomInfo having empty fields rather than nil.

View Source
var EmptyRoomMessages = RoomMessages{
	Msgs: []Message{},
}

EmptyRoomMessages is RoomMessages having empty fields rather than nil.

View Source
var EmptyUnreadRoomMessages = UnreadRoomMessages{
	Msgs: []Message{},
}

EmptyUnreadRoomMessages is UnreadRoomMessages having empty fields rather than nil.

View Source
var EmptyUserRelation = UserRelation{
	Friends: []UserProfile{},
	Rooms:   []UserRoom{},
}

EmptyUserRelation is UserRelation having empty fields rather than nil.

Functions

This section is empty.

Types

type AuthUser

type AuthUser struct {
	ID       uint64 `json:"user_id"`
	Name     string `json:"user_name"`
	Password string `json:"password"`
}

AuthUser is a authenticated user information.

type Message

type Message struct {
	MessageID uint64    `json:"message_id"`
	UserID    uint64    `json:"user_id"`
	Content   string    `json:"content"`
	CreatedAt time.Time `json:"created_at"`
}

type RoomInfo

type RoomInfo struct {
	RoomName    string              `json:"room_name"`
	RoomID      uint64              `json:"room_id"`
	CreatorID   uint64              `json:"room_creator_id"`
	Members     []RoomMemberProfile `json:"room_members"`
	MembersSize int                 `json:"room_members_size"`
}

RoomInfo is a detailed room information. creator

type RoomMemberProfile

type RoomMemberProfile struct {
	UserProfile

	MessageReadAt time.Time `json:"message_read_at"`
}

RoomMemberProfile is a user profile with room specific information.

type RoomMessages

type RoomMessages struct {
	RoomID uint64 `json:"room_id"`

	Msgs []Message `json:"messages"`

	Cursor struct {
		Current time.Time `json:"current"`
		Next    time.Time `json:"next"`
	} `json:"cursor"`
}

RoomMessages is a message list in specified Room.

type UnreadRoomMessages

type UnreadRoomMessages struct {
	RoomID uint64 `json:"room_id"`

	Msgs     []Message `json:"messages"`
	MsgsSize int       `json:"messages_size"`
}

UnreadRoomMessages is a list of unread messages in specified Room.

type UserProfile

type UserProfile struct {
	UserID    uint64 `json:"user_id"`
	UserName  string `json:"user_name"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

UserProfile holds information for user profile.

type UserRelation

type UserRelation struct {
	UserProfile

	Friends []UserProfile `json:"friends"`
	Rooms   []UserRoom    `json:"rooms"`
}

UserRelation is the abstarct information associated with specified User.

type UserRoom

type UserRoom struct {
	RoomID   uint64 `json:"room_id"`
	RoomName string `json:"room_name"`
}

UserRoom holds abstract information for the room.

Jump to

Keyboard shortcuts

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