domain

package
v0.0.0-...-0b17b06 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package domain contains the heart of the domain model.

Index

Constants

This section is empty.

Variables

View Source
var VacationRequestStates = [...]string{
	"new",
	"accepted",
	"rejected",
	"cancelled",
}
View Source
var VacationTypes = [...]string{
	"annual",
	"special",
	"compensatory",
}

Functions

This section is empty.

Types

type VacationRequest

type VacationRequest struct {
	Id      string
	From    time.Time
	To      time.Time
	Type    VacationType
	State   VacationRequestState
	Comment string
}

type VacationRequestRepository

type VacationRequestRepository interface {
	FindAllVacationRequests(context.Context) ([]VacationRequest, error)
	FindById(context.Context, string) (VacationRequest, error)
	Add(context.Context, VacationRequest) error
	Update(context.Context, VacationRequest) error
}

Repository provides access to vacation request repository

type VacationRequestState

type VacationRequestState int
const (
	REQUEST_NEW VacationRequestState = iota
	REQUEST_ACCEPTED
	REQUEST_REJECTED
	REQUEST_CANCELLED
)

func (VacationRequestState) String

func (s VacationRequestState) String() string

type VacationType

type VacationType int
const (
	ANNUAL_VACATION VacationType = iota
	SPECIAL_VACATION
	COMPENSATORY_VACATION
)

func (VacationType) String

func (v VacationType) String() string

Directories

Path Synopsis
Package acceptVacationRequest provides the accept vacation request use-case
Package acceptVacationRequest provides the accept vacation request use-case
Package applyForVacation provides the apply for vacation use-case
Package applyForVacation provides the apply for vacation use-case
Package cancelVacation provides the cancel vacation use-case
Package cancelVacation provides the cancel vacation use-case
plugins
conf
Package conf provides the config for the app
Package conf provides the config for the app
Package rejectVacationRequest provides the accept vacation request use-case
Package rejectVacationRequest provides the accept vacation request use-case

Jump to

Keyboard shortcuts

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