model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Shorturl

type Shorturl struct {
	Shorten string `db:"shorten"` // shorten key
	Url     string `db:"url"`     // original url
}

type ShorturlModel

type ShorturlModel interface {
	// contains filtered or unexported methods
}

ShorturlModel is an interface to be customized, add more methods here, and implement the added methods in customShorturlModel.

func NewShorturlModel

func NewShorturlModel(conn sqlx.SqlConn, c cache.CacheConf) ShorturlModel

NewShorturlModel returns a model for the database table.

Jump to

Keyboard shortcuts

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