Documentation ¶
Index ¶
- type AccumData
- type AnalyticsData
- type Database
- type Message
- type Model
- func (u *Model) CountUniqueUser(where UserWhere) (count uint, err error)
- func (u *Model) FindUsers(where UserWhere, offset uint, limit uint) (user []User, err error)
- func (m *Model) GetAnalyticsData() (d AnalyticsData, err error)
- func (m *Model) GetMostPlayedMCVersion() (v string, err error)
- func (m *Model) GetMostPlayedModVersion() (v string, err error)
- func (m *Model) GetPlayCount() (c uint, err error)
- func (m *Model) GetUserCount() (c uint, err error)
- func (m *Model) GetUserData(id string) (userdata UserData, err error)
- func (m *Model) GetUserTransition() (d []AccumData, err error)
- func (m *Model) PutMessage(msg *Message) error
- func (u *Model) SumPlayCount() (count uint, err error)
- type User
- type UserData
- type UserVersion
- type UserWhere
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsData ¶
type Database ¶
type Database interface { PutMessage(m *Message) error FindUsers(where UserWhere, offset uint, limit uint) (user []User, err error) CountUniqueUser(where UserWhere) (count uint, err error) SumPlayCount() (count uint, err error) GetUserData(id string) (userdata UserData, err error) GetPlayCount() (c uint, err error) GetUserCount() (c uint, err error) GetMostPlayedMCVersion() (v string, err error) GetMostPlayedModVersion() (v string, err error) GetAnalyticsData() (d AnalyticsData, err error) GetUserTransition() (d []AccumData, err error) }
type Message ¶
type Message struct { UUID string `json:"uuid" query:"id" validate:"required,mcuuid"` UserName string `json:"username" query:"name" validate:"required"` IP string `json:"ip"` VersionMod string `json:"version_mod" query:"vmod" validate:"required" json:"-"` VersionModMC string `json:"version_mod_mc" query:"vmodmc" validate:"required" json:"-"` VersionModForge string `json:"version_mod_forge" query:"vmodforge" validate:"required" json:"-"` VersionMC string `json:"version_mc" query:"vmc" validate:"required" json:"-"` VersionForge string `json:"version_forge" query:"vforge" validate:"required" json:"-"` Message string `json:"message"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` UpdatedCount uint `json:"updated_count"` }
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) CountUniqueUser ¶
func (*Model) GetAnalyticsData ¶
func (m *Model) GetAnalyticsData() (d AnalyticsData, err error)
func (*Model) GetMostPlayedMCVersion ¶
func (*Model) GetMostPlayedModVersion ¶
func (*Model) GetPlayCount ¶
func (*Model) GetUserCount ¶
func (*Model) GetUserTransition ¶
func (*Model) PutMessage ¶
func (*Model) SumPlayCount ¶
type User ¶
type User struct { UUID string `json:"uuid" db:"uuid"` UserName string `json:"username" db:"username"` IP string `json:"-" db:"ip"` Message string `json:"message" db:"message"` CreatedAt string `json:"created_at" db:"created_at"` UpdatedAt string `json:"updated_at" db:"updated_at"` UpdatedCount uint `json:"updated_count" db:"updated_count"` }
type UserData ¶
type UserData struct { User *User `json:"user"` UserVersion *[]UserVersion `json:"user_version"` }
type UserVersion ¶
type UserVersion struct { UUID string `json:"-" db:"uuid"` VersionMod string `json:"version_mod" db:"version_mod"` VersiomModMC string `json:"version_mod_mc" db:"version_mod_mc"` VersionModForge string `json:"version_mod_forge" db:"version_mod_forge"` VersionMC string `json:"version_mc" db:"version_mc"` VersionForge string `json:"version_forge" db:"version_forge"` CreatedAt string `json:"created_at" db:"created_at"` UpdatedAt string `json:"updated_at" db:"updated_at"` UpdatedCount string `json:"updated_count" db:"updated_count"` }
Click to show internal directories.
Click to hide internal directories.