Documentation ¶
Index ¶
- Variables
- func Blurb(raw string) (screenjournal.Blurb, error)
- func CommentID(raw string) (screenjournal.CommentID, error)
- func CommentText(comment string) (screenjournal.CommentText, error)
- func Email(email string) (screenjournal.Email, error)
- func InviteCode(raw string) (screenjournal.InviteCode, error)
- func Invitee(raw string) (screenjournal.Invitee, error)
- func MediaTitle(raw string) (screenjournal.MediaTitle, error)
- func MovieIDFromString(raw string) (screenjournal.MovieID, error)
- func Password(plaintext string) (screenjournal.Password, error)
- func Rating(raw int) (screenjournal.Rating, error)
- func ReviewID(id uint64) (screenjournal.ReviewID, error)
- func ReviewIDFromString(raw string) (screenjournal.ReviewID, error)
- func Username(username string) (screenjournal.Username, error)
- func WatchDate(raw string) (screenjournal.WatchDate, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCommentID = errors.New("invalid comment ID") ErrInvalidComment = errors.New("invalid comment") )
View Source
var ( ErrInviteeInvalid = errors.New("invalid invitee name") ErrInviteCodeInvalid = errors.New("invalid invite code") )
View Source
var ( ErrPasswordTooShort = fmt.Errorf("invalid password: must be at least %d characters", minPasswordLength) ErrPasswordTooLong = fmt.Errorf("invalid password: must be %d characters or fewer", maxPasswordLength) ErrPasswordHasInvalidCharacters = errors.New("invalid password: must only contain letters A-Z, a-z, 0-9, or special characters") )
View Source
var ( ErrInvalidReviewID = errors.New("invalid review ID") ErrInvalidMediaTitle = errors.New("invalid media title") ErrInvalidRating = fmt.Errorf("rating must be between %d and %d", minRating, maxRating) ErrWatchDateUnrecognizedFormat = fmt.Errorf("unrecognized format for watch date, must be in %s format", watchDateFormat) ErrWatchDateTooLate = fmt.Errorf("watch time must be no later than %s", time.Now().Format("2006-01-02")) ErrInvalidBlurb = errors.New("invalid blurb") MediaTitleMinLength = 2 MediaTitleMaxLength = 160 )
View Source
var ErrInvalidMovieID = errors.New("invalid movie ID")
View Source
var (
ErrInvalidUsername = errors.New("invalid username")
)
Functions ¶
func CommentText ¶
func CommentText(comment string) (screenjournal.CommentText, error)
func Email ¶
func Email(email string) (screenjournal.Email, error)
Email parses a raw email string into an Email object, validating that it's well-formed.
func InviteCode ¶
func InviteCode(raw string) (screenjournal.InviteCode, error)
func MediaTitle ¶
func MediaTitle(raw string) (screenjournal.MediaTitle, error)
func MovieIDFromString ¶
func MovieIDFromString(raw string) (screenjournal.MovieID, error)
func ReviewIDFromString ¶
func ReviewIDFromString(raw string) (screenjournal.ReviewID, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.