Versions in this module Expand all Collapse all v1 v1.0.1-pre Dec 1, 2024 v1.0.0 Oct 21, 2024 Changes in this version + var ErrHostnameNotFound = errors.New("cant get hostname") + var ErrIFacesAddressNotFound = errors.New("cant get interfaces address") + var ErrIFacesNotFound = errors.New("cant get interfaces") + var ErrIPNotFound = errors.New("local ip not found") + var ErrValidation = errors.New("validation error") + type AuthService interface + ClientTokenCallback func(ctx context.Context, loginCallback *domain.LoginCallback) (*domain.ClientToken, error) + LoginRequest func(ctx context.Context, loginRequest *domain.LoginRequest) (*domain.LoginResp, error) + LogoutRequest func(ctx context.Context, logoutRequest *domain.Logout) error + RefreshToken func(ctx context.Context, refreshToken string) (*domain.ClientToken, error) + Register func(ctx context.Context, user *domain.RegisterUser) (*domain.User, error) + RetrospectToken func(ctx context.Context, token string) (*domain.IntroSpectTokenResult, error) + type Error struct + Code ErrorCode + Message string + func NewError(code ErrorCode, msg string) Error + func (e Error) Error() string + type ErrorCode int + const BadRequest + const Forbidden + const InternalError + const NotFound + const Unauthorized + type InfoService interface + GetAppInfo func(context.Context) (*domain.App, error) + GetAppInfoResponse func(context.Context) (*domain.App, error) + type MqttService interface + HandleMessage func(ctx context.Context, payload *domain.MqttPayload) (*domain.MqttPayload, error) + SetConnected func(bool) + type RegionService interface + GetAll func(ctx context.Context) ([]*domain.Region, error) + GetByID func(ctx context.Context, id int32) (*domain.Region, error) + type SensorService interface + GetAll func(ctx context.Context) ([]*domain.Sensor, error) + type Service interface + Ready func() bool + type Services struct + AuthService AuthService + InfoService InfoService + MqttService MqttService + RegionService RegionService + SensorService SensorService + TreeClusterService TreeClusterService + TreeService TreeService + func (s *Services) AllServicesReady() bool + type TreeClusterService interface + Create func(ctx context.Context, tc *domain.TreeClusterCreate) (*domain.TreeCluster, error) + Delete func(ctx context.Context, id int32) error + GetAll func(ctx context.Context) ([]*domain.TreeCluster, error) + GetByID func(ctx context.Context, id int32) (*domain.TreeCluster, error) + Update func(ctx context.Context, id int32, tc *domain.TreeClusterUpdate) (*domain.TreeCluster, error) + type TreeService interface + Create func(ctx context.Context, treeCreate *domain.TreeCreate) (*domain.Tree, error) + Delete func(ctx context.Context, id int32) error + GetAll func(ctx context.Context) ([]*domain.Tree, error) + GetByID func(ctx context.Context, id int32) (*domain.Tree, error) + ImportTree func(ctx context.Context, trees []*domain.TreeImport) error + Update func(ctx context.Context, id int32, tc *domain.TreeUpdate) (*domain.Tree, error)