contract

package
v0.0.113 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Daily            = recurrenceType("daily")
	Weekly           = recurrenceType("weekly")
	Monthly          = recurrenceType("monthly")
	Yearly           = recurrenceType("yearly")
	Indefinite       = recurrenceEndType("indefinite")
	AfterOccurrences = recurrenceEndType("after_occurrences")
	AfterDate        = recurrenceEndType("after_date")
)
View Source
var (
	Pending    = status("pending")
	Started    = status("started")
	Terminated = status("terminated")
)
View Source
var (
	PunchTypeIn        = punchType("in")
	PunchTypeOut       = punchType("out")
	PunchTypeRideIn    = punchType("ride_in")
	PunchTypeRideOut   = punchType("ride_out")
	PunchWorking       = punchStatus("working")
	PunchPending       = punchStatus("pending")
	PunchApproved      = punchStatus("approved")
	PunchModeDefault   = punchMode("default")
	PunchModeReplace   = punchMode("replace")
	PunchModeDelete    = punchMode("delete")
	PunchmodeWeekSheet = punchMode("weeksheet")
)
View Source
var (
	UserTypeEmployer = userType("employer")
	UserTypeEmployee = userType("employee")
	UserTypeClient   = userType("client")
	UserTypeExternal = userType("external")
)
View Source
var (
	Fixed    = worksiteType("fixed")
	Floating = worksiteType("floating")
)

Functions

func ApplyCore

func ApplyCore[T any](c *T, modifiers ...CoreOption[T]) T

func ApplyMeta

func ApplyMeta[T any](m *T, modifiers ...MetaOption[T]) T

Types

type ComputedHours added in v0.0.106

type ComputedHours struct {
	// Adjusted is the capped value based on employer preferences.
	Adjusted float32
	// Excess is the amount of hours exceeding the allowed threshold.
	Excess float32
}

type CoreOption

type CoreOption[T any] func(*T)

type MetaOption

type MetaOption[T any] func(*T)

type PunchMode added in v0.0.110

type PunchMode string

func (PunchMode) Validate added in v0.0.110

func (p PunchMode) Validate() error

type PunchStatus added in v0.0.105

type PunchStatus string

func (PunchStatus) Validate added in v0.0.105

func (p PunchStatus) Validate() error

type PunchType added in v0.0.105

type PunchType string

func (PunchType) Validate added in v0.0.105

func (p PunchType) Validate() error

type RecurrenceEndType added in v0.0.23

type RecurrenceEndType = string

type RecurrenceType added in v0.0.23

type RecurrenceType = string

type Relation added in v0.0.98

type Relation = uint32
const (
	Na      Relation = iota // Not applicable, for initial friend request only.
	Friend                  // Between all types of users.
	OldHire                 // Between employees and employers only, when the employee is fired.
	Hired                   // Between employees and employers only.
	Manager                 // Between employees and employers only.
)

type Status added in v0.0.23

type Status = string

type UserType added in v0.0.50

type UserType string

func (*UserType) Validate added in v0.0.50

func (u *UserType) Validate() error

type WorksiteType added in v0.0.72

type WorksiteType = string

Jump to

Keyboard shortcuts

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