screenjournal

package
v2.0.0-...-8a7f49b Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: AGPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InviteCodeLength = 6
)

Variables

View Source
var (
	InviteePattern = regexp.MustCompile(`(?i)^[a-z0-9áàâüñçå\-\. ]{1,80}$`)

	// InviteCodeCharset contains the allowed characters for an invite code. It
	// includes alphanumeric characters with commonly-confused characters removed.
	InviteCodeCharset = []rune("ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789")
)

Functions

This section is empty.

Types

type Blurb

type Blurb string

func (Blurb) String

func (b Blurb) String() string

type CommentID

type CommentID uint64

func (CommentID) String

func (id CommentID) String() string

func (CommentID) UInt64

func (id CommentID) UInt64() uint64

type CommentText

type CommentText string

func (CommentText) String

func (ct CommentText) String() string

type Email

type Email string

func (Email) String

func (e Email) String() string

type EmailSubscriber

type EmailSubscriber struct {
	Username Username
	Email    Email
}

EmailSubscriber represents a user or entity that subscribes to events via email notifications.

type ImdbID

type ImdbID string

func (ImdbID) String

func (id ImdbID) String() string

type InviteCode

type InviteCode string

func NewInviteCode

func NewInviteCode() InviteCode

func (InviteCode) Empty

func (ic InviteCode) Empty() bool

func (InviteCode) Equal

func (ic InviteCode) Equal(other InviteCode) bool

func (InviteCode) String

func (ic InviteCode) String() string

type Invitee

type Invitee string

func (Invitee) Empty

func (i Invitee) Empty() bool

func (Invitee) Equal

func (i Invitee) Equal(other Invitee) bool

func (Invitee) String

func (i Invitee) String() string

type MediaTitle

type MediaTitle string

func (MediaTitle) String

func (mt MediaTitle) String() string

type Movie

type Movie struct {
	ID          MovieID
	TmdbID      TmdbID
	ImdbID      ImdbID
	Title       MediaTitle
	ReleaseDate ReleaseDate
	PosterPath  url.URL
}

type MovieID

type MovieID int64

MovieID represents the ID for a movie in the local datastore.

func (MovieID) Equal

func (mid MovieID) Equal(o MovieID) bool

func (MovieID) Int64

func (mid MovieID) Int64() int64

func (MovieID) String

func (mid MovieID) String() string

type NotificationPreferences

type NotificationPreferences struct {
	NewReviews     bool
	AllNewComments bool
}

type Password

type Password string

func (Password) Equal

func (pw Password) Equal(o Password) bool

Equal returns true if two passwords match. Only use this in testing, never as a way of authenticating actual user passwords.

func (Password) String

func (pw Password) String() string

type PasswordHash

type PasswordHash []byte

func (PasswordHash) Bytes

func (ph PasswordHash) Bytes() []byte

type Rating

type Rating uint8

func (Rating) UInt8

func (r Rating) UInt8() uint8

type ReleaseDate

type ReleaseDate time.Time

func (ReleaseDate) Time

func (rd ReleaseDate) Time() time.Time

func (ReleaseDate) Year

func (rd ReleaseDate) Year() int

type Review

type Review struct {
	ID       ReviewID
	Owner    Username
	Rating   Rating
	Blurb    Blurb
	Watched  WatchDate
	Created  time.Time
	Modified time.Time
	Movie    Movie
	Comments []ReviewComment
}

type ReviewComment

type ReviewComment struct {
	ID          CommentID
	Owner       Username
	CommentText CommentText
	Created     time.Time
	Modified    time.Time
	Review      Review
}

type ReviewID

type ReviewID uint64

func (ReviewID) IsZero

func (id ReviewID) IsZero() bool

func (ReviewID) String

func (id ReviewID) String() string

func (ReviewID) UInt64

func (id ReviewID) UInt64() uint64

type SignupInvitation

type SignupInvitation struct {
	Invitee    Invitee
	InviteCode InviteCode
}

func (SignupInvitation) Empty

func (si SignupInvitation) Empty() bool

type SortOrder

type SortOrder string
const (
	ByRating    SortOrder = "rating"
	ByWatchDate SortOrder = "watch-date"
)

type TmdbID

type TmdbID int32

func (TmdbID) Int32

func (m TmdbID) Int32() int32

type User

type User struct {
	IsAdmin      bool
	Username     Username
	Email        Email
	PasswordHash PasswordHash
}

func (User) IsEmpty

func (u User) IsEmpty() bool

type Username

type Username string

func (Username) Equal

func (u Username) Equal(o Username) bool

func (Username) String

func (u Username) String() string

type WatchDate

type WatchDate time.Time

func (WatchDate) Time

func (wd WatchDate) Time() time.Time

Jump to

Keyboard shortcuts

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