service

package
v0.0.0-...-1f1c2ef Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidInput = iota
	ErrNotFound
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentService

type ComponentService interface {
	CreateComponent(pld *p.CreateComponent) (*m.Component, error)
	FindComponentByID(id uint) (*m.Component, error)
	FindAllComponents() (*[]m.Component, error)
	UpdateComponentByID(id uint, pld *p.UpdateComponent) (*m.Component, error)
	DeleteComponentByID(id uint) error
}

func NewComponentService

func NewComponentService(repo r.ComponentRepository) ComponentService

type IncidentService

type IncidentService interface {
	CreateIncident(pld *p.CreateIncident) (*m.Incident, error)

	FindIncidentByID(id uint) (*m.Incident, error)
	FindAllIncidents() (*[]m.Incident, error)

	UpdateIncidentByID(id uint, pld *p.UpdateIncident) (*m.Incident, error)
	DeleteIncidentByID(id uint) error

	CreateIncidentLog(incidentID uint, pld *p.CreateIncidentLog) (*m.IncidentLog, error)
	UpdateIncidentLog(
		incidentID, logID uint, pld *p.UpdateIncidentLog,
	) (*m.IncidentLog, error)
}

func NewIncidentService

func NewIncidentService(
	repo r.IncidentRepository,
	telegramNotifier notifier.Notifier,
) IncidentService

type UserService

type UserService interface {
	RegisterUser(pld *p.RegisterUser) (*m.User, error)
	RegisterFirstAdmin(pld *p.RegisterFirstAdmin) (*m.User, error)
	FindUserByID(id uint) (*m.User, error)
	ExistsAnyAdmin() (bool, error)
	Login(pld *p.Login) (*m.User, error)
}

func NewUserService

func NewUserService(repo r.UserRepository) UserService

Jump to

Keyboard shortcuts

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