Documentation ¶
Index ¶
- type MongoDB
- func (m *MongoDB) Close() error
- func (m *MongoDB) Connect(uri, database string) error
- func (m *MongoDB) GetSessionByID(id string) (*Session, error)
- func (m *MongoDB) GetUserByID(id string) (*User, error)
- func (m *MongoDB) InsertSession(document Session) error
- func (m *MongoDB) UpsertUser(document User) error
- type Server
- type ServerEventLog
- type ServerStatusLog
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { ID string `bson:"_id" json:"id"` Host string `bson:"host" json:"host"` Port uint16 `bson:"port" json:"port"` Online bool `bson:"online" json:"online"` OnlineCount int64 `bson:"onlineCount" json:"online_count"` TotalCount int64 `bson:"totalCount" json:"total_count"` User string `bson:"user" json:"user"` LastStatusCheck time.Time `bson:"lastStatusCheck" json:"last_status_check"` CreatedAt time.Time `bson:"createdAt" json:"created_at"` }
type ServerEventLog ¶
type ServerStatusLog ¶
type ServerStatusLog struct { ID string `bson:"_id" json:"id"` Server string `bson:"server" json:"server"` OnlinePlayers int64 `bson:"onlinePlayers" json:"online_players"` MaxPlayers int64 `bson:"maxPlayers" json:"max_players"` OnlineCount int64 `bson:"onlineCount" json:"online_count"` TotalCount int64 `bson:"totalCount" json:"total_count"` Timestamp time.Time `bson:"timestamp" json:"timestamp"` }
type User ¶
type User struct { ID string `bson:"_id" json:"id"` Username string `bson:"username" json:"username"` Discriminator string `bson:"discriminator" json:"discriminator"` Avatar *string `bson:"avatar" json:"avatar"` AccessToken string `bson:"accessToken" json:"-"` RefreshToken string `bson:"refreshToken" json:"-"` CreatedAt time.Time `bson:"createdAt" json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.