models

package
v0.0.0-...-d98ba24 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

type Url

type Url struct {
	gorm.Model
	UniqueHashUrl string `gorm:"unique;not null;size:64"`
	MainUrl       string `gorm:"not null"`
}

type UrlModel

type UrlModel struct {
	Model
}

func NewUrlModel

func NewUrlModel(connection db.DbConnection) (*UrlModel, error)

func (*UrlModel) GetMainUrl

func (urlModel *UrlModel) GetMainUrl(uniqueHashUrl string) (string, error)

func (*UrlModel) Insert

func (urlModel *UrlModel) Insert(mainUrl string, uniqueHashUrl string) error

Jump to

Keyboard shortcuts

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