pets

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dsn string) (DB, error)

func (DB) CreatePet

func (db DB) CreatePet(name string, age int, kind string)

func (DB) ListPets

func (db DB) ListPets() []Pet

func (DB) Migrate

func (db DB) Migrate()

type Pet

type Pet struct {
	gorm.Model
	Name string
	Age  int
	Kind string `gorm:"default:generic"`
}

Jump to

Keyboard shortcuts

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