usecase

package
v0.0.0-...-93e8ec0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package usecase implements application business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppUseCase

type AppUseCase struct {
	UserWebAPI webapi.WebAPI
}

AppUseCase implements UseCase interface. It implements data-modifier business logic through third-party WebAPI calls.

func NewAppUseCase

func NewAppUseCase(a webapi.WebAPI) *AppUseCase

NewAppUseCase returns AppUseCase.

func (*AppUseCase) AddAbsenceStatus

func (uc *AppUseCase) AddAbsenceStatus(u *entity.User, p [2]entity.CustomTime) error

AddAbsenceStatus finds user absence status info for a time period p on a WebAPI and adds it to the user data.

func (*AppUseCase) GetUserID

func (uc *AppUseCase) GetUserID(u *entity.User) error

GetUserID finds the user id on a WebAPI.

type UseCase

type UseCase interface {
	GetUserID(*entity.User) error
	AddAbsenceStatus(*entity.User, [2]entity.CustomTime) error
}

UseCase is a minimal interface for modifying user data based on a third-party system.

Jump to

Keyboard shortcuts

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