Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { jwt.StandardClaims UserID int `json:"id"` Nickname string `json:"nck"` Private bool `json:"prv"` }
Claims represents custom claims for jwt authentication.
type Config ¶
type Config struct { Debug bool Host string Port string DatabasePath string JWTSecret string UpdateSecret string AppName string }
Config represents configuration that is being used by server.
type Device ¶
type Device struct { DevicePublicData // OwnerID is id of user that owns this device. OwnerID int // MAC contains hashed MAC address of the device. MAC []byte }
type DevicePublicData ¶
type User ¶
type User struct { UserPublicData // Password of User hashed with bcrypt algorithm. Password []byte // Private is flag for enabling private-mode that hides // user activity from others. Private bool }
User represents single user data stored in storage.
type UserPublicData ¶
type UserPublicData struct { // ID unique to every user. ID int `json:"id"` // Nickname represents name that will be exposed to public, // to inform people who is in the hackerspace. Nickname string `json:"nickname"` // Online indicates if player is currently in the hackerspace. Online bool `json:"online"` }
UserPublicData is subset of User containing only data that can be shown publicly to everybody that will interact with API or website.
Click to show internal directories.
Click to hide internal directories.