Documentation
¶
Index ¶
Constants ¶
View Source
const ( MAX_ORIGIN_LINK_LENGTH = 255 MIN_ORIGIN_LINK_LENGTH = 0 )
View Source
const ( STATUS_ACTIVE = "active" STATUS_EXPIRED = "expired" STATUS_DELETED = "deleted" )
View Source
const ( MAX_ROLE_LENGHT = 10 MAX_TOKEN_LENGHT = 64 ROLE_ADMIN = "admin" ROLE_USER = "user" ROLE_BANNED = "banned" )
Variables ¶
View Source
var ( RoleLengthErr = errors.New("role name too long (max length: 10)") TokenLengthErr = errors.New("token too long (max length: 64)") )
View Source
var (
OriginLinkLengthErr = errors.New("Origin link too long or too short (max length 255 characters, min length 0 characters)")
)
Functions ¶
func CreateToken ¶
func GenerateShortLink ¶
func IsValidURL ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.