database

package
v0.0.0-...-debbccd Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDatabase = "gorm"
	DefaultDBUser   = "gorm"
	DefaultHost     = "myhost"
	DefaultPort     = "myport"
	DefaultPassword = "mypassword"
)

Variables

This section is empty.

Functions

func Init

func Init(dialect, host, port, dbname, pass string) (*gorm.DB, error)

Types

type Document

type Document struct {
	gorm.Model
	TicketID  string `gorm:"type:varchar(100);unique_index"`
	Content   string `gorm:"type:varchar(100)"`
	Title     string `gorm:"type:varchar(100)"`
	Author    string `gorm:"type:varchar(100)"`
	Topic     string `gorm:"type:varchar(100)"`
	Watermark string `gorm:"type:varchar(100)"`
}

Jump to

Keyboard shortcuts

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