database

package
v0.0.0-...-db3ded4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetItemAmount

func GetItemAmount(db *gorm.DB) int

GetItemAmount returns the length of all the items in the database

func Initialize

func Initialize() (*gorm.DB, error)

Initialize the database

Types

type Item

type Item struct {
	gorm.Model
	URL    string `json:"url"`
	Scheme string `json:"scheme"`
	Host   string `json:"host"`
	Path   string `json:"path"`
}

Item model for storing websites

Jump to

Keyboard shortcuts

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