repository

package
v0.0.0-...-344b8df Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 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 InvitationRepository

type InvitationRepository interface {
	FindAll(offset, limit int, isAttend *bool) <-chan Result
	FindByWaNumber(waNumber string) <-chan Result
	FindByName(name string) <-chan Result
	CalculateCount(isAttend bool) <-chan Result
	FindEvents() <-chan Result
	Save(data *model.Invitation) <-chan Result
	SaveEvent(data *model.Event) <-chan Result
	RemoveByWaNumber(waNumber string) <-chan Result
	AddVisitor(obj *model.Visitor) <-chan error
	FetchVisitor(startDate, endDate time.Time) <-chan Result
}

InvitationRepository abstract interface

func NewInvitationRepository

func NewInvitationRepository(repo *Repository) InvitationRepository

NewInvitationRepository create new repository

type Repository

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

func NewRepository

func NewRepository(db *mgo.Database) *Repository

type Result

type Result struct {
	Count int
	Data  interface{}
	Error error
}

Result repository model

type UserRepository

type UserRepository interface {
	FindByUsername(username string) <-chan Result
	Insert(dataUser *model.User) <-chan Result
}

UserRepository abstract interface

func NewUserRepository

func NewUserRepository(repo *Repository) UserRepository

NewUserRepository create new repository

Jump to

Keyboard shortcuts

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