shoturl

package
v0.0.0-...-1cb6917 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

README

Package shoturl 是一个短链接包

目前还不够完善

接口部分需要进行验证参数提交是否合法以及为空 检查是否存在XSS,CORS 漏洞 完善管理功能,制作可变活链接

Documentation

Overview

Package shoturl ...doc domain/api/shoturl fromdata: ?do=create&source=要缩短的网址; ?do=delete&str=要删除的短网址;

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Route

func Route(en *gin.Engine)

Route Init

Types

type ShotURL

type ShotURL struct {
	gorm.Model
	UUID     string `gorm:"type:varchar(36);not null;unique;column:uuid"` // 设置字段为非空并唯一 // `xorm:"varchar(36) pk notnull unique 'uuid'"`
	UserUUID string `gorm:"type:varchar(36); column:user_uuid"`           // `xorm:"varchar(36) pk notnull unique 'user_uuid'"` // user uuid
	Code     string `gorm:"type:varchar(36);unique;column:code"`          // code
	Source   string `gorm:"type:varchar(2048)"`                           // `xorm:"varchar(255) 'source'"`             // 源地址
	Protocol string `gorm:"type:varchar(32)"`
	Exp      time.Time
}

ShotURL data

Jump to

Keyboard shortcuts

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