dao

package
v0.0.0-...-116761d Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDB

func GetDB(dbName string) *gorm.DB

func GetDefault

func GetDefault() *gorm.DB

func Init

func Init() error

func SetDB

func SetDB(dbName string, db *gorm.DB)

Types

type Example

type Example struct {
	gorm.Model
	Title    string    `gorm:"column:title"`
	Text     string    `gorm:"column:text"`
	Author   string    `gorm:"column:author"`
	PostedOn time.Time `gorm:"column:posted_on"`
}

func (*Example) Create

func (dao *Example) Create(example *Example) error

func (*Example) TableName

func (dao *Example) TableName() string

Jump to

Keyboard shortcuts

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