models

package
v0.0.0-...-606cdbc Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	StopAt time.Time
	Name   string
	Emoji  RawEmoji
}

Activity represents an activity a user is displaying on their profile

type Channel

type Channel struct {
	ChannelID string
	Topic     string
}

type Comment

type Comment struct {
	UserID  string
	Content string
}

type Friend

type Friend struct {
	// contains filtered or unexported fields
}

type Message

type Message struct {
	mgm.DefaultModel `bson:",inline"`
	UserID           string
	CreatedAt        time.Time
	ChannelID        string
	Content          string
	// contains filtered or unexported fields
}

func (*Message) CollectionName

func (m *Message) CollectionName() string

func (*Message) MarshalToPB

func (m *Message) MarshalToPB() *pb.Message

func (*Message) Saved

func (m *Message) Saved() error

func (*Message) SetupMessage

func (m *Message) SetupMessage()

func (*Message) WaitForSave

func (m *Message) WaitForSave()

type RawEmoji

type RawEmoji struct {
	Name string
}

type Reaction

type Reaction struct {
	Emoji  RawEmoji
	UserID string
}

type Server

type Server struct {
	ServerID string
	OwnerID  string
	Members  []string
	// Spaces []Space
	Channels []Channel
}

type User

type User struct {
	ID            string
	Token         string
	Email         string
	Salt          []byte `json:"-"`
	Password      []byte `json:"-"`
	Username      string
	Discriminator string
	Servers       []string
	Friends       []string
	Activity      Activity
	Settings      UserSettings
}

User is the current datatype for fenix users.

func (*User) ToJSON

func (user *User) ToJSON() string

ToJSON converts the user to JSON

type UserSettings

type UserSettings struct {
}

A UserSettings struct is a nice grouping of all current settings a user has

Jump to

Keyboard shortcuts

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