model

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApnsTokenConfig

type ApnsTokenConfig struct {
	KeyId  string `json:"key_id"`
	TeamId string `json:"team_id"`
}

type Dashboard

type Dashboard struct {
	Identifier      primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	WidgetContainer []WidgetContainer  `json:"widget_container,omitempty" bson:"widget_container,omitempty"`
	User            string             `json:"user,omitempty" bson:"user,omitempty"`
	Official        bool               `json:"official,omitempty" bson:"official,omitempty"`
	Default         bool               `json:"default,omitempty" bson:"default,omitempty"`
	MeetingStates   []string           `json:"meeting_states,omitempty" bson:"meeting_states,omitempty"`
}

type Device

type Device struct {
	Name           string `json:"name" bson:"name"`
	Model          string `json:"model" bson:"model"`
	LocalizedModel string `json:"localized_model" bson:"localized_model"`
	SystemName     string `json:"system_name" bson:"system_name"`
	SystemVersion  string `json:"system_version" bson:"system_version"`
	Type           string `json:"type" bson:"type"`
	UISize         string `json:"ui_size" bson:"ui_size"`
	Language       string `json:"language" bson:"language"`
	AppVersion     string `json:"app_version" bson:"app_version"`
}

type Following

type Following struct {
	FollowingAthletes []FollowingAthlete `json:"following_athletes,omitempty" bson:"following_athletes,omitempty"`
	FollowingTeams    []FollowingTeam    `json:"following_teams,omitempty" bson:"following_teams,omitempty"`
}

Following TODO use merged struct

type FollowingAthlete

type FollowingAthlete struct {
	AthleteId primitive.ObjectID `json:"athlete_id" bson:"athlete_id"`
	AddedAt   time.Time          `json:"added_at,omitempty" bson:"added_at,omitempty"`
}

type FollowingTeam

type FollowingTeam struct {
	TeamId  primitive.ObjectID `json:"team_id" bson:"team_id"`
	AddedAt time.Time          `json:"added_at,omitempty" bson:"added_at,omitempty"`
}

FollowingTeam TODO make teams followable

type NotificationSettings

type NotificationSettings struct {
	Athlete    bool `json:"athlete" bson:"athlete"`
	Favourites bool `json:"favourites" bson:"favourites"`
	Meeting    bool `json:"meeting" bson:"meeting"`
	Schedule   bool `json:"schedule" bson:"schedule"`
}

type NotificationUser

type NotificationUser struct {
	Identifier primitive.ObjectID   `json:"_id" bson:"_id,omitempty"`
	UserId     primitive.ObjectID   `json:"user_id" bson:"user_id,omitempty"`
	Token      string               `json:"token" bson:"token"`
	Settings   NotificationSettings `json:"settings,omitempty" bson:"settings"`
	Device     Device               `json:"device" bson:"device"`
	AddedAt    time.Time            `json:"added_at,omitempty" bson:"added_at,omitempty"`
	UpdatedAt  time.Time            `json:"updated_at,omitempty" bson:"updated_at,omitempty"`
}

func (*NotificationUser) HasSetting added in v0.1.4

func (user *NotificationUser) HasSetting(notificationType string) bool

type Settings

type Settings struct {
	Language string `json:"language,omitempty" bson:"language,omitempty"`
	Theme    string `json:"theme,omitempty" bson:"theme,omitempty"`
}

type TokenClaims

type TokenClaims struct {
	Sub    uuid.UUID
	Scopes []string
}

func (*TokenClaims) IsRoot

func (tc *TokenClaims) IsRoot() bool

type User

type User struct {
	Identifier   primitive.ObjectID  `json:"_id,omitempty" bson:"_id,omitempty"`
	KeycloakId   string              `json:"keycloak_id,omitempty" bson:"keycloak_id,omitempty"`
	Following    []FollowingAthlete  `json:"following,omitempty" bson:"following,omitempty"`
	OwnAthleteId *primitive.ObjectID `json:"own_athlete_id,omitempty" bson:"own_athlete_id,omitempty"`
	Settings     Settings            `json:"settings,omitempty" bson:"settings,omitempty"`
	Meetings     []string            `json:"meetings,omitempty" bson:"meetings,omitempty"`
}

type Widget

type Widget struct {
	Identifier primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Size       string             `json:"size,omitempty" bson:"size,omitempty"`
	Content    string             `json:"content,omitempty" bson:"content,omitempty"`
}

type WidgetContainer

type WidgetContainer struct {
	OrderPosition int          `json:"order_position,omitempty" bson:"order_position,omitempty"`
	Widgets       []WidgetTile `json:"widgets,omitempty" bson:"widgets,omitempty"`
}

type WidgetTile

type WidgetTile struct {
	WidgetID      primitive.ObjectID `json:"-" bson:"widget_id,omitempty"`
	Widget        Widget             `json:"widget,omitempty" bson:"-"`
	Data          any                `json:"data,omitempty" bson:"data,omitempty"`
	OrderPosition int                `json:"order_position,omitempty" bson:"order_position,omitempty"`
}

Jump to

Keyboard shortcuts

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