model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvPro is pro.
	EnvPro = "pro"
	// EnvTest is env.
	EnvTest = "test"
	// EnvDev is env.
	EnvDev = "dev"
)
View Source
const (
	StateNormal = 0
	StateDelted = 1
)

Variables

This section is empty.

Functions

func Generate

func Generate(long string) [4]string

generate short url from long url

Types

type Param

type Param struct {
	ID  int64  `form:"id"`
	Mid int64  `form:"mid"`
	Uri string `form:"url"`
	Pn  string `form:"pn"`
	Ps  string `form:"ps"`
}

type ShortUrl

type ShortUrl struct {
	ID         int64      `json:"id"`
	Mid        int64      `json:"mid"`
	Short      string     `json:"short"`
	Long       string     `json:"long"`
	State      int8       `json:"state"`
	CTime      xtime.Time `json:"-"`
	MTime      xtime.Time `json:"-"`
	CreateTime string     `json:"ctime"`
}

func (*ShortUrl) FormatDate

func (s *ShortUrl) FormatDate()

Jump to

Keyboard shortcuts

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