model

package
v0.0.0-...-5f01fc0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanTime

func HumanTime(unixTime int64) string

func LongHumanTime

func LongHumanTime(unixTime int64) string

Types

type Certificate

type Certificate struct {
	SHA256    string `db:"cert_sha256"`
	ExpireAt  int64  `db:"expire_at"`
	CreatedAt int64  `db:"created_at"`
	UpdatedAt int64  `db:"updated_at"`
}

func (Certificate) GetCreatedAt

func (c Certificate) GetCreatedAt() string

func (Certificate) GetExpireAt

func (c Certificate) GetExpireAt() string

func (Certificate) GetSHA256

func (c Certificate) GetSHA256() string

func (Certificate) GetUpdatedAt

func (c Certificate) GetUpdatedAt() string

type Gram

type Gram struct {
	ID        uint64 `db:"id"`
	Avatar    string `db:"avatar"`
	Body      string `db:"body"`
	ExpireAt  int64  `db:"expire_at"`
	Sparkles  int    `db:"sparkles"`
	UserID    uint64 `db:"user_id"`
	UserName  string `db:"user_name"`
	CreatedAt int64  `db:"created_at"`
	UpdatedAt int64  `db:"updated_at"`
}

type Password

type Password struct {
	UserID    uint64 `db:"user_id"`
	Argon2    string `db:"argon2"`
	Salt      string `db:"salt"`
	CreatedAt int64  `db:"created_at"`
	UpdatedAt int64  `db:"updated_at"`
}

func NewPassword

func NewPassword(password string) (_ Password, length, upper, lower, digit, special bool)

type Profile

type Profile struct {
	Avatar    string         `db:"users.avatar"`
	FirstName string         `db:"users.first_name"`
	LastName  string         `db:"users.last_name"`
	LastSeen  int64          `db:"users.last_seen"`
	Password  sql.NullString `db:"passwords.argon2"`
	UserID    uint64         `db:"users.id"`
	UserName  string         `db:"users.user_name"`
	CreatedAt int64          `db:"users.created_at"`
}

type User

type User struct {
	ID        uint64 `db:"users.id"`
	Avatar    string `db:"users.avatar"`
	ExpireAt  int64  `db:"users.expire_at"`
	FirstName string `db:"users.first_name"`
	LastName  string `db:"users.last_name"`
	LastSeen  int64  `db:"users.last_seen"`
	UserName  string `db:"users.user_name"`
	CreatedAt int64  `db:"users.created_at"`
	UpdatedAt int64  `db:"users.updated_at"`
}

Jump to

Keyboard shortcuts

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