Discover Packages
github.com/alexyslozada/shorturl
model
package
Version:
v0.0.0-...-2b4ac10
Opens a new window with list of versions in this module.
Published: Sep 27, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
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")
)
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 LoginRequest struct {
Email string `json:"email"`
Password string `json:"password"`
}
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 Sheets struct {
HasToReportToSheets bool
ConfigFile string
SpreadsheetID string
SpreadsheetSheet string
}
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 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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.