gormrepo

package
v0.0.0-...-d944f76 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 3 Imported by: 0

README

gormrepo

Package gormrepo is a very basic introduction to:

  • gorm
  • an implementation of the repository pattern

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(fn string) (contact.Repository, error)

Types

type Gormrepo

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

func (*Gormrepo) Close

func (g *Gormrepo) Close()

func (*Gormrepo) Delete

func (g *Gormrepo) Delete(c *contact.Contact) error

func (*Gormrepo) Get

func (g *Gormrepo) Get(id uint) (*contact.Contact, error)

func (*Gormrepo) List

func (g *Gormrepo) List() ([]*contact.Contact, error)

func (*Gormrepo) New

func (g *Gormrepo) New(c *contact.Contact) (*contact.Contact, error)

func (*Gormrepo) Update

func (g *Gormrepo) Update(c *contact.Contact) (*contact.Contact, error)

Jump to

Keyboard shortcuts

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