models

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MailStatusUnread  = 101 // Job has not run
	MailStatusRead    = 201 // Job has not run
	MailStatusDeleted = 301 // Job has not run

)

Status codes for jobs

View Source
const (
	RoleAdmin  string = "admin"
	RoleCoach  string = "coach"
	RolePlayer string = "player"
	RoleMedic  string = "medic"
	RoleOwner  string = "owner"
	RoleMember string = "member"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cronbox

type Cronbox struct {
	JobID         JobID     `json:"jobId" db:"job_id"`
	OwnerID       string    `json:"ownerId" db:"owner_id"`
	Schedule      string    `json:"schedule" db:"schedule"`
	Timezone      string    `json:"timezone" db:"timezone"`
	Created       time.Time `json:"created" db:"created"`
	LastRun       time.Time `json:"lastRun" db:"last_run"`
	Expire        time.Time `json:"expire" db:"expire"`
	StatusMessage string    `json:"statusMessage" db:"status_message"`
	StatusCode    int       `json:"statusCode" db:"status_code"`
	Count         int       `json:"count" db:"count"`
	CountMax      int       `json:"countMax" db:"count_max"`
	MessageID     string    `json:"messageId" db:"message_id"`
}

Cronbox lists scheduled mail delivery

type GamePerformance

type GamePerformance struct {
	Owner                          string `json:"owner" db:"owner"`
	Datum                          string `json:"datum" db:"datum"`
	TeamOverallPerformance         string `json:"teamOverallPerformance" db:"team_overall_performance"`
	IndividualDefensivePerformance string `json:"individualDefensivePerformance" db:"individual_defensive_performance"`
	IndividualOffensivePerformance string `json:"individualOffensivePerformance" db:"individual_offensive_performance"`
}

GamePerformance represents a game performance report submitted by the user

type Illness

type Illness struct {
	Owner    string `json:"owner" db:"owner"`
	Datum    string `json:"datum" db:"datum"`
	Problems string `json:"problems" db:"problems"`
}

Illness represents an illness report submitted by the user

type Injury

type Injury struct {
	Owner    string `json:"owner" db:"owner"`
	Datum    string `json:"datum" db:"datum"`
	Comment  string `json:"comment" db:"comment"`
	Injuries string `json:"injuries" db:"injuries"`
}

Injury represents an injury report submitted by the user

type JobID

type JobID int

type Mailbox

type Mailbox struct {
	OwnerID       string    `json:"ownerId" db:"owner_id"`
	Name          string    `json:"name" db:"name"`
	MessageID     string    `json:"messageId" db:"message_id"`
	StatusCode    int       `json:"status_code" db:"status_code"`
	StatusMessage string    `json:"status_message" db:"status_message"`
	Date          time.Time `json:"date" db:"date"`
}

Mailbox lists status on mail delivery

type Message

type Message struct {
	MessageID  string    `json:"messageId" db:"message_id"`
	From       string    `json:"from" db:"from"`
	Sender     string    `json:"sender" db:"sender"`
	ReplyTo    string    `json:"replyTo" db:"reply_to"`
	InReplyTo  string    `json:"inReplyTo" db:"in_reply_to"`
	To         string    `json:"to" db:"to"`
	Cc         string    `json:"cc" db:"cc"`
	Bcc        string    `json:"bcc" db:"bcc"`
	References string    `json:"references" db:"references"`
	Date       time.Time `json:"date" db:"date"`
	Subject    string    `json:"subject" db:"subject"`
	Body       string    `json:"body" db:"body"`
}

Message sturcture with RFC-4021 compatible fields.

type OwnerID

type OwnerID string

type Profile

type Profile struct {
	ID         string `json:"sub" db:"id, primarykey"`
	GivenName  string `json:"given_name" db:"given_name"`
	FamilyName string `json:"family_name" db:"family_name"`
	NickName   string `json:"nickname" db:"nickname"`
	Name       string `json:"name" db:"name"`
	UpdatedAt  string `json:"updated_at" db:"updated_at"`
	Picture    string `json:"picture" db:"picture"`
	Email      string `json:"email" db:"email"`
}

Profile holds personal user information

type PushSubscription

type PushSubscription struct {
	Sub       string    `json:"sub" db:"sub"`
	Platform  string    `json:"platform" db:"platform"`
	Token     string    `json:"token" db:"token"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
}

PushSubscription holds tokens for device push messaging

type Role

type Role struct {
	ID     int    `json:"-" db:"id, primarykey, autoincrement"`
	PID    string `json:"pId" db:"pid"`
	TeamID string `json:"team_id" db:"team_id"`
	Role   string `json:"role" db:"role"`
}

Role maps user identities to team roles

type Team

type Team struct {
	ID          string `json:"id" db:"id, primarykey, autoincrement"`
	Name        string `json:"name" db:"name"`
	Email       string `json:"email" db:"email"`
	Description string `json:"description" db:"description"`
	LogoURL     string `json:"logo_url" db:"logo_url"`
}

Team holds team information

type TeamSettings

type TeamSettings struct {
	TeamID           string `json:"teamId" db:"team_id"`
	Menstruation     bool   `json:"menstruation" db:"menstruation"`
	GameReports      bool   `json:"gameReports" db:"game_reports"`
	UpdatedTs        string `json:"updatedTs" db:"updated_ts"`
	UpdatedProfileID string `json:"updatedProfileId" db:"updated_profile_id"`
}

TeamSettings represent a row in the team_settings db table

type Tl

type Tl struct {
	Owner    string  `json:"owner" db:"owner"`
	Datum    string  `json:"datum" db:"datum"`
	Tl       float32 `json:"tl" db:"tl"`
	Srpe     string  `json:"srpe" db:"srpe"`
	Rpe      string  `json:"rpe" db:"rpe"`
	Duration string  `json:"duration" db:"duration"`
	Matchday string  `json:"matchday" db:"matchday"`
}

Tl reflects the structure of a db table daily_tl

type UserToken

type UserToken struct {
	//	ID           int       `json:"-" db:"id, primarykey, autoincrement"`
	Sub          string    `json:"sub" db:"sub"`
	Aud          string    `json:"aud" db:"aud"`
	AccessToken  string    `json:"access_token" db:"access_token"`
	TokenType    string    `json:"token_type,omitempty" db:"token_type"`
	RefreshToken string    `json:"refresh_token,omitempty" db:"refresh_token"`
	Expiry       time.Time `json:"expiry,omitempty" db:"expiry"`
}

UserToken holds users' access token. Extends the oauth2.Token structure with additional information

type UserTokenQuery

type UserTokenQuery struct {
	Sub string `json:"sub" db:"sub"`
	Aud string `json:"aud" db:"aud"`
}

UserTokenQuery are used to query the database for tokens

type Wellness

type Wellness struct {
	Owner        string  `json:"owner" db:"owner"`
	Datum        string  `json:"datum" db:"datum"`
	Fatigue      int     `json:"fatigue" db:"fatigue"`
	Mood         int     `json:"mood" db:"mood"`
	Readiness    int     `json:"readiness" db:"readiness"`
	SleepDurH    float32 `json:"sleepDurationH" db:"sleep_duration_h"`
	SleepQuality int     `json:"sleepQuality" db:"sleep_quality"`
	Soreness     int     `json:"soreness" db:"soreness"`
	Stress       int     `json:"stress" db:"stress"`
}

Jump to

Keyboard shortcuts

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