db

package
v0.0.0-...-180210d Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	ID       int
	Members  []*User
	Messages []*Message
	Files    []*File
}

type DB

type DB struct {
	RegisteredUsers []*User
}

func GetDB

func GetDB() *DB

func InitDB

func InitDB() *DB

type File

type File struct {
	ID         int
	Sender     *User
	URL        string
	UploadTime time.Time
}

type Message

type Message struct {
	ID        int
	Sender    *User
	Message   string
	Files     []*File
	Timestamp time.Time
	Status    MsgStatus
}

type MsgStatus

type MsgStatus uint8
const (
	Sent MsgStatus = iota
	Received
)

type User

type User struct {
	ID                int
	Username          string
	ProfilePictureURL string
	Friends           []*User
	Chats             []*Chat
}

Jump to

Keyboard shortcuts

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