entities

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

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 2 Imported by: 26

Documentation

Index

Constants

View Source
const TEXT_SOURCE_BOOK = "book"
View Source
const TEXT_SOURCE_MOVIE = "movie"
View Source
const TEXT_SOURCE_NONE = ""
View Source
const TEXT_SOURCE_OTHER = "other"
View Source
const TEXT_SOURCE_SONG = "song"
View Source
const TEXT_STATUS_ACCEPTED = 2
View Source
const TEXT_STATUS_REJECTED = 0
View Source
const TEXT_STATUS_SUBMITTED = 1
View Source
const TEXT_TYPE_ASIN = "ASIN"
View Source
const TEXT_TYPE_ISBN = "ISBN"
View Source
const TEXT_TYPE_NONE = ""

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Id      string            `gorethink:"id,omitempty"`
	Created time.Time         `gorethink:"created"`
	Type    ActivityType      `gorethink:"typeId,reference" gorethink_ref:"id"`
	Data    map[string]string `gorethink:"data"`
}

type ActivityType

type ActivityType struct {
	Id   string `gorethink:"id,omitempty"`
	Text string `gorethink:"text"`
	Icon string `gorethink:"icon"`
}

type Comment

type Comment struct {
	Id      string    `gorethink:"id, omitempty"`
	User    User      `gorethink:"userId,reference" gorethink_ref:"id"`
	Created time.Time `gorethink:"created"`
	Text    string    `gorethink:"text"`
}

type Comments

type Comments struct {
	ChannelId string    `gorethink:"id, omitempty"`
	Items     []Comment `gorethink:"items"`
}

type GameChart

type GameChart struct {
	Id    string       `gorethink:"id,omitempty"`
	Items []GameResult `gorethink:"items,reference" gorethink_ref:"id"`
}

type GamePlayback

type GamePlayback struct {
	Id       string                   `gorethink:"id,omitempty"`
	Playback []map[string]interface{} `gorethink:"playback"`
}

type GameResult

type GameResult struct {
	Id       string         `gorethink:"id,omitempty"`
	User     User           `gorethink:"userId,reference" gorethink_ref:"id"`
	Created  time.Time      `gorethink:"created"`
	WPM      int            `gorethink:"wpm"`
	Accuracy int            `gorethink:"accuracy"`
	Time     int            `gorethink:"time"`
	Mistakes map[string]int `gorethink:"mistakes"`
	Session  GameSession    `gorethink:"sessionId,reference" gorethink_ref:"id"`
	Place    int            `gorethink:"place"`
	IP       string         `gorethink:"ip"`
}

type GameSession

type GameSession struct {
	Id       string    `gorethink:"id,omitempty"`
	Created  time.Time `gorethink:"created"`
	Online   bool      `gorethink:"online"`
	Open     bool      `gorethink:"open"`
	Finished bool      `gorethink:"finished"`
	Text     GameText  `gorethink:"text,reference" gorethink_ref:"id"`
}

type GameText

type GameText struct {
	Id          string   `gorethink:"id,omitempty"`
	Text        string   `gorethink:"text"`
	Status      int      `gorethink:"status"`
	Language    Language `gorethink:"language,reference" gorethink_ref:"id"`
	Source      string   `gorethink:"source"` // Is this text from a book, movie or something else?
	Type        string   `gorethink:"type"`   // Amazon ID type (ISBN/ASIN etc)
	Code        string   `gorethink:"code"`   // Amazon Code with type specified above
	User        User     `gorethink:"user,reference" gorethink_ref:"id"`
	IsSubmitted bool     `gorethink:"isSubmitted"` // Is this text send through the public form or added by an admin?
}

type Language

type Language struct {
	Id   string `gorethink:"id, omitempty"`
	Name string `gorethink:"name"`
}

type Level

type Level struct {
	Level int    `gorethink:"level,omitempty"`
	Name  string `gorethink:"name"`
}

type SessionCookie

type SessionCookie struct {
	UserId string
	Role   string
}

type SortResultsByScore

type SortResultsByScore []GameResult

func (SortResultsByScore) Len

func (a SortResultsByScore) Len() int

func (SortResultsByScore) Less

func (a SortResultsByScore) Less(i, j int) bool

func (SortResultsByScore) Swap

func (a SortResultsByScore) Swap(i, j int)

type User

type User struct {
	Id       string `gorethink:"id,omitempty"`
	Name     string `gorethink:"name"`
	Email    string `gorethink:"email"`
	Password string `gorethink:"password"`
	Username string `gorethink:"username"`

	Active bool   `gorethink:"active"`
	Role   string `gorethink:"role"`

	Keyboard       string `gorethink:"keyboard"`
	KeyboardLayout int    `gorethink:"keyboardLayout"`
	Bio            string `gorethink:"bio"`

	Created time.Time `gorethink:"created"`

	Level int `gorethink:"level"`
	Exp   int `gorethink:"exp"`

	Country string `gorethink:"country"`
}

type UserFeed

type UserFeed struct {
	User  User       `gorethink:"userId,reference" gorethink_ref:"id"`
	Items []Activity `gorethink:"items,reference" gorethink_ref:"id"`
}

type UserFeedFollow

type UserFeedFollow struct {
	User      User   `gorethink:"userId,reference" gorethink_ref:"id"`
	Followers []User `gorethink:"followers,reference" gorethink_ref:"id"`
	Following []User `gorethink:"following,reference" gorethink_ref:"id"`
}

type UserStats

type UserStats struct {
	User           User `gorethink:"userId,reference" gorethink_ref:"id"`
	WPM            int  `gorethink:"wpm"`
	Accuracy       int  `gorethink:"accuracy"`
	GoldenTrophies int  `gorethink:"goldenTrophies"`
	SilverTrophies int  `gorethink:"silverTrophies"`
	BronzeTrophies int  `gorethink:"bronzeTrophies"`
	GamesPlayed    int  `gorethink:"gamesPlayed"`
}

type UserToken

type UserToken struct {
	Token   string    `gorethink:"token"`
	Expires time.Time `gorethink:"expires"`
	User    User      `gorethink:"userId,reference" gorethink_ref:"id"`
	Used    bool      `gorethink:"used"`
	Type    string    `gorethink:"type"`
	Value   string    `gorethink:"value"`
}

Jump to

Keyboard shortcuts

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