repo

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewImpl)

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IRepo

type IRepo interface {
	// GetByID serve caller to get an activity by id
	GetByID(ctx contextx.Contextx, id, userID int64) (info *event.Activity, err error)

	// GetByEmails serve caller to given emails to get users information
	GetByEmails(ctx contextx.Contextx, emails []string) (infos []*user.Member, err error)

	// Create an activity with name and members
	Create(ctx contextx.Contextx, created *event.Activity) (info *event.Activity, err error)

	// AddMembers serve caller to add members into activity
	AddMembers(ctx contextx.Contextx, id int64, newUsers []*user.Member) (info *event.Activity, err error)

	// List serve caller to list all activities
	List(ctx contextx.Contextx, userID int64, limit, offset int) (infos []*event.Activity, err error)

	// Count serve caller to count all activities
	Count(ctx contextx.Contextx, userID int64) (total int, err error)

	// Update serve caller to update an activity information
	Update(ctx contextx.Contextx, updated *event.Activity) (info *event.Activity, err error)

	// Delete serve caller to delete an activity by id
	Delete(ctx contextx.Contextx, id, userID int64) error
}

IRepo declare activity repository functions

func CreateRepo

func CreateRepo(logger *zap.Logger, rw *sqlx.DB) (IRepo, error)

CreateRepo serve caller to create an IRepo

func NewImpl

func NewImpl(logger *zap.Logger, rw *sqlx.DB) IRepo

NewImpl serve caller to create an IRepo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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