application

package
v0.0.0-...-e4a5794 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationRepository

type NotificationRepository interface {
	// Get Get the notifications
	Get(offset int, size int, orderBy string, orderAsc string) (notificationList []*n.Notification, err error)
	// GetById Get the notification by Id
	GetById(id uuid.UUID) (notification *n.Notification, err error)
	// Create Create the notification
	Create(notification *n.Notification) (err error)
	// Update Update the notification
	Update(notification *n.Notification) (err error)
	// Delete Delete the notification
	Delete(id uuid.UUID) (err error)
	// Stats Get the stats
	Stats() (total int, succeeded int, failed int, err error)
}

type PreferenceService

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

func NewPreferenceService

func NewPreferenceService(userRepository UserRepository) (service *PreferenceService)

NewPreferenceService Creates a Preference service

func (*PreferenceService) Update

func (p *PreferenceService) Update(u *user.User) (err error)

type RegistrationService

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

func NewRegistrationService

func NewRegistrationService(userRepository UserRepository) (registrationService *RegistrationService)

NewRegistrationService Creates a registration service with the provided userRepository implementation

func (*RegistrationService) RegisterUser

func (r *RegistrationService) RegisterUser(endpoint string, remoteIp string, keyAuth string, keyP256DH string) (user *u.User, err error)

type ScheduleService

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

func NewScheduleService

func NewScheduleService(notificationRepository NotificationRepository) (scheduleService *ScheduleService)

type UserRepository

type UserRepository interface {
	// Get Get the users
	Get(offset int, size int, orderBy string, orderAsc string, onlyActive bool) (userList []*u.User, err error)
	// GetById Get the user by Id
	GetById(id uuid.UUID) (user *u.User, err error)
	// GetByEndpoint Get the user by endpoint
	GetByEndpoint(endpoint string) (user *u.User, err error)
	// Create Create the user
	Create(user *u.User) (err error)
	// Update Update the user
	Update(user *u.User) (err error)
	// Delete Delete the user by uuid
	Delete(id uuid.UUID) (err error)
	// GetTotal Get the total number of users
	GetTotal(onlyActive bool) (total int, err error)
	// Stats Get the stats
	Stats() (total int, active int, inactive int, err error)
}

Jump to

Keyboard shortcuts

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