aztek

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: MIT Imports: 3 Imported by: 0

README

aztek

Go Gorm CRUD

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresCoreRepo added in v0.1.0

type PostgresCoreRepo struct {
	DB *gorm.DB
}

func NewPostgesCoreRepo added in v0.1.0

func NewPostgesCoreRepo(connectionString string) *PostgresCoreRepo

func (*PostgresCoreRepo) Create added in v0.1.0

func (rp *PostgresCoreRepo) Create(model interface{}) error

func (*PostgresCoreRepo) Delete added in v0.1.0

func (rp *PostgresCoreRepo) Delete(id string, model interface{}) error

TODO Remove associations

func (*PostgresCoreRepo) GetAll added in v0.1.0

func (rp *PostgresCoreRepo) GetAll(model interface{}) (interface{}, error)

func (*PostgresCoreRepo) GetByCode added in v0.1.0

func (rp *PostgresCoreRepo) GetByCode(code string, model interface{}, preload []string) (interface{}, error)

func (*PostgresCoreRepo) GetById added in v0.1.0

func (rp *PostgresCoreRepo) GetById(id string, model interface{}, preload []string) (interface{}, error)

func (*PostgresCoreRepo) GetWhere added in v0.3.0

func (rp *PostgresCoreRepo) GetWhere(model interface{}, preload []string) (interface{}, error)

func (*PostgresCoreRepo) GetWhereMultiple added in v0.4.0

func (rp *PostgresCoreRepo) GetWhereMultiple(model interface{}, preload []string) (interface{}, error)

func (*PostgresCoreRepo) Migrations added in v0.1.0

func (rp *PostgresCoreRepo) Migrations(models []interface{})

func (*PostgresCoreRepo) Update added in v0.1.0

func (rp *PostgresCoreRepo) Update(id string, model interface{}) error

type Repository added in v0.1.0

type Repository interface {
	Migrations(models []interface{})
	GetAll(model interface{}) (interface{}, error)
	GetById(id string, model interface{}, preload []string) (interface{}, error)
	GetByCode(code string, model interface{}, preload []string) (interface{}, error)
	GetWhere(model interface{}, preload []string) (interface{}, error)
	GetWhereMultiple(model interface{}, preload []string) (interface{}, error)
	Update(id string, model interface{}) error
	Delete(id string, model interface{}) error
	Create(model interface{}) error
}

Jump to

Keyboard shortcuts

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