mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 01:15:10 -06:00
refactor: move types out of app.go into types/, renamed module files
This commit is contained in:
22
types/common.go
Normal file
22
types/common.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package types
|
||||
|
||||
import "time"
|
||||
|
||||
// DurationString represents a duration, such as "2s" or "24h".
|
||||
// See https://pkg.go.dev/time#ParseDuration for all valid time units.
|
||||
type DurationString string
|
||||
|
||||
// TimeString is a 24-hr format time "HH:MM" such as "07:30".
|
||||
type TimeString string
|
||||
|
||||
// TimeRange represents a time range with start and end times.
|
||||
type TimeRange struct {
|
||||
Start time.Time
|
||||
End time.Time
|
||||
}
|
||||
|
||||
// Item represents a priority queue item with a value and priority.
|
||||
type Item struct {
|
||||
Value interface{}
|
||||
Priority float64
|
||||
}
|
||||
Reference in New Issue
Block a user