model

package
v1.0.0 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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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