dblayer

package
v0.0.0-...-8b41f8a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBconfig

func DBconfig() (*sql.DB, error)

func DeleteURL

func DeleteURL(db *sql.DB, u *URL) error

func InsertURL

func InsertURL(db *sql.DB, u *URL) error

Types

type URL

type URL struct {
	Original_url string
	Short_code   string
	Created_at   time.Time
}

func CheckUrlExists

func CheckUrlExists(db *sql.DB, u *URL) (*URL, error)

func GetLongUrl

func GetLongUrl(db *sql.DB, u *URL) (*URL, error)

func GetShortUrl

func GetShortUrl(db *sql.DB, u *URL) (*URL, error)

Jump to

Keyboard shortcuts

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