usecase

package
v0.0.0-...-33dd593 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUsecase

type AuthUsecase struct {
	EmpRepo  domain.EmployeeInterface
	RoleRepo domain.RoleInterface
}

func NewAuthUsecase

func NewAuthUsecase(employeeRepo domain.EmployeeInterface, roleRepo domain.RoleInterface) *AuthUsecase

func (*AuthUsecase) Login

func (au *AuthUsecase) Login(nip, password string) (string, string, error)

func (*AuthUsecase) RefreshToken

func (au *AuthUsecase) RefreshToken(refreshToken string) (string, string, error)

type EchelonUsecase

type EchelonUsecase struct {
	EchelonRepo domain.EchelonInterface
	// contains filtered or unexported fields
}

func NewEchelonUsecase

func NewEchelonUsecase(echelonRepo domain.EchelonInterface, roleRepo domain.RoleInterface) *EchelonUsecase

func (*EchelonUsecase) AddEchelon

func (e *EchelonUsecase) AddEchelon(proposerId string, echelon *domain.Echelon) error

func (*EchelonUsecase) GetAll

func (e *EchelonUsecase) GetAll() ([]domain.Echelon, error)

type EmployeeAssignmentUsecase

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

func (*EmployeeAssignmentUsecase) AssignEmployee

func (e *EmployeeAssignmentUsecase) AssignEmployee(proposerId string, assignStatement *domain.EmployeeAssignment) error

func (*EmployeeAssignmentUsecase) Deactivate

func (e *EmployeeAssignmentUsecase) Deactivate(proposerId string, employeeID string, unitID int, positionID int) error

func (*EmployeeAssignmentUsecase) GetAll

func (*EmployeeAssignmentUsecase) GetAssignmentByAllID

func (e *EmployeeAssignmentUsecase) GetAssignmentByAllID(proposerId string, employeeID string, unitID int, positionID int) (*domain.EmployeeAssignmentResponse, error)

func (*EmployeeAssignmentUsecase) GetAssignmentByEmployeeID

func (e *EmployeeAssignmentUsecase) GetAssignmentByEmployeeID(proposerId string, employeeID string) (*domain.EmployeeAssignmentResponse, error)

type GradeUsecase

type GradeUsecase struct {
	GradeRepo domain.GradeInterface
	// contains filtered or unexported fields
}

func NewGradeUsecase

func NewGradeUsecase(gradeRepo domain.GradeInterface, roleRepo domain.RoleInterface) *GradeUsecase

func (*GradeUsecase) AddGrade

func (g *GradeUsecase) AddGrade(proposerId string, grade *domain.Grade) error

func (*GradeUsecase) GetAll

func (g *GradeUsecase) GetAll() ([]domain.Grade, error)

type MeUsecase

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

func NewMeUsecase

func NewMeUsecase(empRepo domain.EmployeeInterface, roleRepo domain.RoleInterface, unitRepo domain.UnitInterface, s3Repo domain.S3Interface) *MeUsecase

func (*MeUsecase) GetMe

func (eu *MeUsecase) GetMe(proposerId string) (*domain.Employee, error)

func (*MeUsecase) UpdateMe

func (eu *MeUsecase) UpdateMe(proposerId string, employee *domain.Employee) (*domain.Employee, error)

func (*MeUsecase) UploadPPMe

func (eu *MeUsecase) UploadPPMe(proposerId string, file *multipart.FileHeader) (string, error)

type PositionUsecase

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

func NewPositionUsecase

func NewPositionUsecase(positionRepo domain.PositionInterface, roleRepo domain.RoleInterface) *PositionUsecase

func (*PositionUsecase) AddPosition

func (uc *PositionUsecase) AddPosition(proposerId string, position *domain.Position) (*domain.Position, error)

func (*PositionUsecase) DeletePosition

func (uc *PositionUsecase) DeletePosition(proposerId string, id int) error

func (*PositionUsecase) GetAllPosition

func (uc *PositionUsecase) GetAllPosition() ([]domain.Position, error)

func (*PositionUsecase) GetPositionByID

func (uc *PositionUsecase) GetPositionByID(id int) (*domain.Position, error)

func (*PositionUsecase) SearchPosition

func (uc *PositionUsecase) SearchPosition(query string) ([]domain.Position, error)

func (*PositionUsecase) UpdatePosition

func (uc *PositionUsecase) UpdatePosition(proposerId string, position *domain.Position) (*domain.Position, error)

type PrintUsecase

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

func NewPrintUsecase

func NewPrintUsecase(printRepo domain.PrintInterface, empRepo domain.EmployeeInterface, roleRepo domain.RoleInterface, unitRepo domain.UnitInterface) *PrintUsecase

func (*PrintUsecase) PrintAll

func (eu *PrintUsecase) PrintAll(proposerId string) ([]domain.PrintEmployee, error)

func (*PrintUsecase) PrintByNIP

func (eu *PrintUsecase) PrintByNIP(proposerId string, nip string) (*domain.PrintEmployee, error)

func (*PrintUsecase) PrintByUnitID

func (eu *PrintUsecase) PrintByUnitID(proposerId string, unitId int) ([]domain.PrintEmployee, error)

type ReligionUsecase

type ReligionUsecase struct {
	ReligionRepo domain.ReligionInterface
	// contains filtered or unexported fields
}

func NewReligionUsecase

func NewReligionUsecase(religionRepo domain.ReligionInterface, roleRepo domain.RoleInterface) *ReligionUsecase

func (*ReligionUsecase) AddReligion

func (r *ReligionUsecase) AddReligion(proposerId string, religion *domain.Religion) error

func (*ReligionUsecase) GetAll

func (r *ReligionUsecase) GetAll() ([]domain.Religion, error)

type UnitUsecase

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

func NewUnitUsecase

func NewUnitUsecase(unitRepo domain.UnitInterface, roleRepo domain.RoleInterface) *UnitUsecase

func (*UnitUsecase) AddUnit

func (uc *UnitUsecase) AddUnit(proposerId string, unit *domain.Unit) (*domain.Unit, error)

func (*UnitUsecase) DeleteUnit

func (uc *UnitUsecase) DeleteUnit(proposerId string, id int) error

func (*UnitUsecase) GetAllUnit

func (uc *UnitUsecase) GetAllUnit() ([]domain.Unit, error)

func (*UnitUsecase) GetUnitByID

func (uc *UnitUsecase) GetUnitByID(id int) (*domain.Unit, error)

func (*UnitUsecase) SearchUnit

func (uc *UnitUsecase) SearchUnit(input string) ([]domain.Unit, error)

func (*UnitUsecase) UpdateUnit

func (uc *UnitUsecase) UpdateUnit(proposerId string, unit *domain.Unit) (*domain.Unit, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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