user

package
v0.0.0-...-5c56469 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Get(filter map[string]interface{}, where, orderBy, selectField string) ([]*model.UserModel, error)
	Count(filter map[string]interface{}, where string) (int, error)
	Create(userReq *model.UserModel) (*model.UserModel, error)
	GetByID(id, selectField string) (*model.UserModel, error)
	Update(userReq *model.UserModel) (*model.UserModel, error)
	Delete(id string) error
}

Repository represent the repositories

func NewMysqlRepository

func NewMysqlRepository(DBRead *sqlx.DB, DBWrite *sqlx.DB) Repository

NewMysqlRepository will create an object that represent the Repository interface

type Service

type Service interface {
	Create(req *form.UserForm) (*model.UserModel, int, error)
	Delete(id string) (int, error)
	Detail(id string, selectField string) (*model.UserModel, int, error)
	List(filter, filterCount map[string]interface{}, where, orderBy, selectField string) ([]*model.UserModel, int, int, error)
	Update(req *form.UserForm, id string) (*model.UserModel, int, error)
}

Service represent the services

func NewService

func NewService(log *logrus.Entry, r Repository) Service

NewService will create an object that represent the Service interface

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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