repository

package
v0.0.0-...-4c04d20 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecordNotFound = errors.New("record not found")

Functions

func ValidateEvent

func ValidateEvent(v *validator.Validator, event Event)

Types

type CalendarRepository

type CalendarRepository interface {
	CreateEvent(ctx context.Context, event *Event) error
	ListEvent(ctx context.Context, userId uint64) ([]Event, error)
	DeleteEvent(ctx context.Context, eventId string, userId uint64) error
	ServiceStatus(ctx context.Context) error
}

func NewCalendarRepository

func NewCalendarRepository(conn db.Connection) CalendarRepository

type Event

type Event struct {
	Id      primitive.ObjectID `json:"id"`
	UserId  uint64             `json:"user_id"`
	Name    string             `json:"name"`
	Details string             `json:"details,omitempty"`
	Start   time.Time          `json:"start"`
	End     time.Time          `json:"end"`
	Color   string             `json:"color"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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