services

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserService

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

UserService struct

func NewUserService

func NewUserService(db *sqlx.DB) *UserService

NewUserService return new UserService object

func (*UserService) DeleteUser

func (us *UserService) DeleteUser(user models.User) error

DeleteUser delete user and get rows affected

func (*UserService) DeleteUserByID added in v0.1.2

func (us *UserService) DeleteUserByID(id int64) error

DeleteUserByID delete user by id and get rows affected

func (*UserService) GetUser

func (us *UserService) GetUser(id int64) (*utils.ResultTransformer, error)

GetUser return user by id

func (*UserService) GetUsers

func (us *UserService) GetUsers() *utils.ResultTransformer

GetUsers return all users

func (*UserService) InsertUser

func (us *UserService) InsertUser(user models.User) (int64, error)

InsertUser insert new user and get last id

func (*UserService) UpdateUser

func (us *UserService) UpdateUser(user models.User) error

UpdateUser update user and get rows affected

Jump to

Keyboard shortcuts

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