model

package
v0.0.0-...-4ab17c3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGoly

func CreateGoly(goly Goly) error

func DeleteGoly

func DeleteGoly(id uint64) error

func Setup

func Setup()

func UpdateGoly

func UpdateGoly(goly Goly) error

Types

type Goly

type Goly struct {
	ID       uint64 `json:"id" gorm:"primaryKey"`
	Redirect string `json:"redirect" gorm:"not null"`
	Goly     string `json:"goly" gorm:"unique;not null"`
	Clicked  uint64 `json:"clicked"`
	Random   bool   `json:"random"`
}

func FindByGolyUrl

func FindByGolyUrl(url string) (Goly, error)

func GetAllGolies

func GetAllGolies() ([]Goly, error)

func GetGoly

func GetGoly(id uint64) (Goly, error)

Jump to

Keyboard shortcuts

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