gormi

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 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 GormDB

type GormDB struct {
	DB *gorm.DB
}

func (*GormDB) AutoMigrate

func (d *GormDB) AutoMigrate(dst ...interface{}) error

func (*GormDB) Create

func (d *GormDB) Create(value interface{}) error

func (*GormDB) Filter

func (d *GormDB) Filter(dest interface{}, conds ...interface{}) error

func (*GormDB) First

func (d *GormDB) First(dest interface{}, conds ...interface{}) error

func (*GormDB) Get

func (d *GormDB) Get(dest interface{}, key string) error

func (*GormDB) GetUser

func (d *GormDB) GetUser(dest interface{}, id string) error

type GormSqliteBackend

type GormSqliteBackend struct {
	Name string
}

func NewSqliteBackend

func NewSqliteBackend(name string) *GormSqliteBackend

func (*GormSqliteBackend) Connect

func (b *GormSqliteBackend) Connect() (gorf.Db, error)

func (*GormSqliteBackend) Disconnect

func (b *GormSqliteBackend) Disconnect() error

type User

type User struct {
	gorm.Model
	FirstName string `json:"first_name" binding:"required"`
	LastName  string `json:"last_name" binding:"required"`
}

Jump to

Keyboard shortcuts

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