entities

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationToken

type AuthenticationToken struct {
	authvalues.BasicAuthToken

	ID   HexID
	User User
}

type HexID

type HexID uuid.UUID // Hex based id (like uuid)

func NewHexID

func NewHexID() (HexID, error)

func NewHexIDFromBytes

func NewHexIDFromBytes(b []byte) (HexID, error)

func ParseHexID

func ParseHexID(input string) (HexID, error)

func (HexID) IsEmpty

func (id HexID) IsEmpty() bool

func (HexID) String

func (id HexID) String() string

type Identifier

type Identifier uint64 // Integer based identifier

type Participant

type Participant struct {
	Timestamp

	ID             HexID
	RelatedUser    User
	SecretFriendID HexID
	JoinedAt       time.Time
	IsReady        bool
}

func NewParticipant

func NewParticipant(secretFriendID HexID, relatedUser User) Participant

type SecretFriend

type SecretFriend struct {
	Timestamp

	ID              HexID
	Name            string
	Datetime        time.Time
	Location        string
	OwnerID         HexID
	InviteCode      string
	MaxDenyListSize uint8
	Status          SecretFriendStatus
	Participants    []Participant
}

func (*SecretFriend) Normalize

func (sf *SecretFriend) Normalize()

type SecretFriendStatus

type SecretFriendStatus string
const (
	StatusDraft  SecretFriendStatus = "draft"
	StatusOpen   SecretFriendStatus = "open"
	StatusDrawn  SecretFriendStatus = "drawn"
	StatusClosed SecretFriendStatus = "closed"
)

type Timestamp

type Timestamp struct {
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Timestamp) Normalize

func (ts *Timestamp) Normalize()

type User

type User struct {
	authvalues.UserBasic

	ID            HexID
	VerifiedAt    time.Time
	RememberToken string
}

type UserProfile

type UserProfile struct {
	Timestamp

	ID        HexID
	UserID    HexID
	FullName  string
	Nickname  string
	ImageLink string
	Birthday  time.Time
	Address   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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