models

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: None detected not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BanRecord

type BanRecord struct {
	ID               string     `json:"id"`
	OwnerID          string     `json:"owner_id"`
	BanishedID       string     `json:"banished_id"`
	BanishedUsername string     `json:"banished_username"`
	Reason           *string    `json:"reason,omitempty"`
	Start            time.Time  `json:"start"`
	End              *time.Time `json:"end,omitempty"`
	Duration         *string    `json:"duration,omitempty"`
	Pardoned         bool       `json:"pardoned"`
}

type Channel

type Channel struct {
	ID          int     `json:"id"`
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	SortOrder   int     `json:"sort_order,omitempty"`
}

Channel represents a chat channel with a name and optional description

type ChatMessage

type ChatMessage struct {
	ID       int       `json:"id,omitempty"`
	CacheID  int       `json:"cacheID,omitempty"`
	OwnerID  string    `json:"owner_id"`
	Username string    `json:"username"`
	Channel  string    `json:"channel"`
	Message  string    `json:"message"`
	Sent     time.Time `json:"authored_at"`
}

ChatMessage represents a chat message sent by a user. This message is broadcasted to all clients in the specified channel.

type PrivateChatMessage

type PrivateChatMessage struct {
	ID          int       `json:"id,omitempty"`
	CacheID     int       `json:"cacheID,omitempty"`
	OwnerID     string    `json:"owner_id"`     // Sender's ID
	Username    string    `json:"username"`     // Sender's username
	RecipientID string    `json:"recipient_id"` // Receiver's userID
	Recipient   string    `json:"recipient"`    // Receiver's username
	Message     string    `json:"message"`
	Sent        time.Time `json:"authored_at"`
}

PrivateChatMessage represents a private message sent between two users.

type RateLimiter

type RateLimiter struct {
	ID            int    `json:"id"`
	OwnerID       string `json:"owner_id"`
	MessageLimit  int    `json:"message_limit"`
	WindowSeconds int    `json:"window_seconds"`
}

type SessionActivity

type SessionActivity struct {
	SessionDate   string `json:"session_date"`
	SessionCount  int    `json:"session_count"`
	TotalDuration string `json:"total_duration"`
}

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Banned   bool   `json:"is_banned"`
}

Jump to

Keyboard shortcuts

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