model

package
v0.0.0-...-1842cec Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VerificationCodeTTL is the time a verification code is valid for
	VerificationCodeTTL = 24 * time.Hour
	// UnsubscribeTokenTTL is the time an unsubscribe token is valid for
	UnsubscribeTokenTTL = 7 * 24 * time.Hour

	// ResendVerificationCodeCooldown is the cooldown period between verification code resends
	ResendVerificationCodeCooldown = 120 * time.Second
)
View Source
const (
	// GoogleAuthTokenProvider is google auth token provider
	GoogleAuthTokenProvider = "google"
	// GitHubAuthTokenProvider is github auth token provider
	GitHubAuthTokenProvider = "github"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role string

Role - user role

const (
	UserRoleName      Role = "user"
	PublisherRoleName Role = "publisher"
)

User role names

type UpdateProfileParams

type UpdateProfileParams struct {
	Name        *string
	Password    *string
	NewPassword *string
}

UpdateProfileParams contains parameters for updating user profile

type User

type User struct {
	ID            string
	Username      string
	DisplayName   string
	Email         string
	EmailVerified bool
	Role          string
}

User represents a user

func (*User) IsPublisher

func (u *User) IsPublisher() bool

IsPublisher checks if user is a publisher

Jump to

Keyboard shortcuts

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