models

package
v0.0.0-...-4effd02 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	ID        int           `json:"id"`
	User      User          `json:"-"`
	Short     string        `json:"short"`
	Long      string        `json:"long"`
	Active    bool          `json:"active"`
	Visited   int           `json:"visited"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt *sql.NullTime `json:"updated_at"`
}

type Token

type Token struct {
	ID        int           `json:"-"`
	Token     string        `json:"token"`
	User      User          `json:"-"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt *sql.NullTime `json:"updated_at"`
}

func (Token) IsExpired

func (t Token) IsExpired() bool

func (Token) Validete

func (t Token) Validete() error

type User

type User struct {
	ID        int           `json:"-"`
	Username  string        `json:"username"`
	Password  string        `json:"-"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt *sql.NullTime `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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