db

package
v0.0.0-...-02a9109 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB   *gorm.DB
	Lock sync.Mutex
)

Functions

func AddPath

func AddPath(path, title, keywords, description string, mode string, parse bool, data []byte) (err error)

func Close

func Close()

func Display

func Display() string

func GetName

func GetName() string

func GetPath

func GetPath(path string) (context []byte, mode string, err error)

func Open

func Open(v string) (err error)

func SetName

func SetName(v string)

Types

type Command

type Command struct {
	gorm.Model

	Options string `gorm:"type:VARCHAR(500)"`
}

func GetCommands

func GetCommands() (cmd []*Command, err error)

type Page

type Page struct {
	gorm.Model

	Path        string `gorm:"not null;index;type:VARCHAR(200)"`
	Title       string `gorm:"index;type:VARCHAR(200)"`
	KeyWords    string `gorm:"type:VARCHAR(200)"`
	Description string `gorm:"type:VARCHAR(500)"`
	Mode        string `gorm:"index;type:VARCHAR(50)"`
	Parse       bool   `gorm:"index"`
	Data        []byte `gorm:"type:BLOB"`
}

func GetAllPath

func GetAllPath() (pages []*Page, err error)

Jump to

Keyboard shortcuts

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