dao

package
v0.0.0-...-7b3391a Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB
View Source
var Redis *redis.Client

Functions

func InitTestDB

func InitTestDB() *gorm.DB

func NewRedis

func NewRedis() *redis.Client

Types

type Shorturl

type Shorturl struct {
	gorm.Model
	Url     string `json:"url"`
	Shorten string `json:"shorten"`
}

shorturl

func NewShorturl

func NewShorturl() Shorturl

func Print

func Print() Shorturl

func (*Shorturl) GetShorten

func (s *Shorturl) GetShorten(url, shorten string) (string, error)

func (*Shorturl) GetUrl

func (s *Shorturl) GetUrl(shorten string) (string, error)

func (Shorturl) TableName

func (Shorturl) TableName() string

Jump to

Keyboard shortcuts

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