types

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTimezones

func LoadTimezones(file string)

func Timezone

func Timezone(s string) (*time.Location, error)

Timezones are a complete nightmare e.g. https://github.com/golang/go/issues/12388

Types

type EventsList

type EventsList struct {
	DeviceID uint32
	Events   []uhppoted.Event
}

type Group

type Group struct {
	OID  string
	Name string
}

func (*Group) Clone

func (g *Group) Clone() Group

type Groups

type Groups map[string]Group

func (*Groups) Clone

func (g *Groups) Clone() Groups

type IController

type IController interface {
	OID() schema.OID
	Name() string
	ID() uint32
	EndPoint() *net.UDPAddr
	TimeZone() *time.Location
	Door(uint8) (schema.OID, bool)

	DateTimeOk() bool
}

type Interval

type Interval struct {
	From uint32
	To   uint32
}

func (Interval) Contains

func (i Interval) Contains(v uint32) bool

type Permissions

type Permissions struct {
	CardNumber uint32
	From       core.Date
	To         core.Date
	Doors      []string
}

func (Permissions) String

func (p Permissions) String() string

type RunMode

type RunMode int
const (
	Normal RunMode = iota
	Monitor
	Synchronize
)

func ParseRunMode

func ParseRunMode(s string) RunMode

func (RunMode) String

func (r RunMode) String() string

type Status

type Status int
const (
	StatusUnknown Status = iota
	StatusOk
	StatusUncertain
	StatusError
	StatusUnconfigured
	StatusNew
	StatusDeleted
	StatusIncomplete
)

func (Status) String

func (s Status) String() string

type Timestamp

type Timestamp time.Time

func TimestampNow

func TimestampNow() Timestamp

func (Timestamp) Add

func (ts Timestamp) Add(dt time.Duration) Timestamp

func (Timestamp) Before

func (ts Timestamp) Before(t time.Time) bool

Because time.Truncate does not in any way behave like your would expect it to :-(

func (Timestamp) IsZero

func (ts Timestamp) IsZero() bool

func (Timestamp) MarshalJSON

func (ts Timestamp) MarshalJSON() ([]byte, error)

func (Timestamp) String

func (ts Timestamp) String() string

func (Timestamp) UTC

func (ts Timestamp) UTC() Timestamp

func (*Timestamp) UnmarshalJSON

func (ts *Timestamp) UnmarshalJSON(bytes []byte) error

type Uint8

type Uint8 uint8

func (Uint8) MarshalJSON

func (u Uint8) MarshalJSON() ([]byte, error)

func (Uint8) String

func (u Uint8) String() string

type Uint32

type Uint32 uint32

func (Uint32) MarshalJSON

func (u Uint32) MarshalJSON() ([]byte, error)

func (Uint32) String

func (u Uint32) String() string

Jump to

Keyboard shortcuts

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