model

package
v0.0.0-...-2b4ac10 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingDependency = errors.New("missing dependency")
	ErrWrongRedirect     = errors.New("the m.Redirect has not a valid protocol")
	ErrMethodNotAllowed  = errors.New("the method is not allowed")
)

Functions

This section is empty.

Types

type Histories

type Histories []History

type History

type History struct {
	ID         uuid.UUID `json:"id"`
	ShortURLID uuid.UUID `json:"short_url_id"`
	CreatedAt  int64     `json:"created_at"`
	UpdatedAt  int64     `json:"updated_at"`
}

type JWTCustomClaims

type JWTCustomClaims struct {
	UserID uuid.UUID `json:"user_id"`
	Email  string    `json:"email"`
	jwt.StandardClaims
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type Permission

type Permission struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	CanCreate bool      `json:"can_create"`
	CanUpdate bool      `json:"can_update"`
	CanDelete bool      `json:"can_delete"`
	CanSelect bool      `json:"can_select"`
	IsAdmin   bool      `json:"is_admin"`
	CreatedAt int64     `json:"created_at"`
	UpdatedAt int64     `json:"updated_at"`
}

type Permissions

type Permissions []Permission

type Sheets

type Sheets struct {
	HasToReportToSheets bool
	ConfigFile          string
	SpreadsheetID       string
	SpreadsheetSheet    string
}

type ShortURL

type ShortURL struct {
	ID          uuid.UUID `json:"id"`
	IsRandom    bool      `json:"is_random"`
	Short       string    `json:"short"`
	RedirectTo  string    `json:"redirect_to"`
	Description string    `json:"description"`
	Times       int       `json:"times"`
	CreatedAt   int64     `json:"created_at"`
	UpdatedAt   int64     `json:"updated_at"`
}

type ShortURLs

type ShortURLs []ShortURL

type User

type User struct {
	ID        uuid.UUID `json:"id"`
	Email     string    `json:"email"`
	Password  string    `json:"password"`
	FullName  string    `json:"full_name"`
	Active    bool      `json:"active"`
	CreatedAt int64     `json:"created_at"`
	UpdatedAt int64     `json:"updated_at"`
}

type Users

type Users []User

Jump to

Keyboard shortcuts

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