mysql

package
v0.0.0-...-dc97487 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 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 Item

type Item struct {
	*Repository
}

func (*Item) Create

func (i *Item) Create(item *model.Item) error

func (*Item) Delete

func (i *Item) Delete(item *model.Item) error

type Repository

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

func NewRepository

func NewRepository(db *gorm.DB) *Repository

func (*Repository) BeginTransaction

func (r *Repository) BeginTransaction() (repository.Store, error)

func (*Repository) Commit

func (r *Repository) Commit() error

func (*Repository) Items

func (r *Repository) Items() repository.Item

func (*Repository) Rollback

func (r *Repository) Rollback() error

func (*Repository) Users

func (r *Repository) Users() repository.User

type User

type User struct {
	*Repository
}

func (*User) Create

func (u *User) Create(user *model.User) error

func (*User) FindByEmail

func (u *User) FindByEmail(email string) (*model.User, error)

func (*User) FindByID

func (u *User) FindByID(id string) (*model.User, error)

Jump to

Keyboard shortcuts

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