doors

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DoorControl = schema.DoorControl
View Source
const DoorControlConfigured = schema.DoorControlConfigured
View Source
const DoorControlError = schema.DoorControlError
View Source
const DoorControlModified = schema.DoorControlModified
View Source
const DoorControlStatus = schema.DoorControlStatus
View Source
const DoorCreated = schema.Created
View Source
const DoorDelay = schema.DoorDelay
View Source
const DoorDelayConfigured = schema.DoorDelayConfigured
View Source
const DoorDelayError = schema.DoorDelayError
View Source
const DoorDelayModified = schema.DoorDelayModified
View Source
const DoorDelayStatus = schema.DoorDelayStatus
View Source
const DoorDeleted = schema.Deleted
View Source
const DoorKeypad = schema.DoorKeypad
View Source
const DoorName = schema.DoorName
View Source
const DoorPasscodes = schema.DoorPasscodes
View Source
const DoorStatus = schema.Status

Variables

This section is empty.

Functions

func CanAdd added in v0.8.3

func CanAdd[T TAuthable](a auth.OpAuth, u T) error

func CanDelete added in v0.8.3

func CanDelete[T TAuthable](a auth.OpAuth, u T) error

func CanUpdate added in v0.8.3

func CanUpdate[T TAuthable](a auth.OpAuth, u T, field string, value any) error

func CanView added in v0.8.3

func CanView[T TAuthable](a auth.OpAuth, u T, field string, value any) error

Types

type Door

type Door struct {
	catalog.CatalogDoor
	// contains filtered or unexported fields
}

func (*Door) AsObjects

func (d *Door) AsObjects(a *auth.Authorizator) []schema.Object

func (Door) AsRuleEntity

func (d Door) AsRuleEntity() (string, any)

func (Door) CacheKey added in v0.8.10

func (d Door) CacheKey() string

func (*Door) Delay

func (d *Door) Delay() uint8

func (*Door) IsDeleted

func (d *Door) IsDeleted() bool

func (Door) IsOk

func (d Door) IsOk() bool

func (Door) IsValid

func (d Door) IsValid() bool

func (Door) Keypad added in v0.8.6

func (d Door) Keypad() bool

func (*Door) Mode

func (d *Door) Mode() core.ControlState

func (Door) Status

func (d Door) Status() types.Status

func (Door) String

func (d Door) String() string

type Doors

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

func NewDoors

func NewDoors() Doors

func (*Doors) AsObjects

func (dd *Doors) AsObjects(a *auth.Authorizator) []schema.Object

func (*Doors) ByName

func (dd *Doors) ByName(name string) (Door, bool)

func (*Doors) Clone

func (dd *Doors) Clone() Doors

NTS: 'added' is specifically not cloned - it has a lifetime for the duration of

the 'shadow' copy only

func (*Doors) Create

func (dd *Doors) Create(a *auth.Authorizator, oid schema.OID, value string, dbc db.DBC) ([]schema.Object, error)

func (*Doors) Delete

func (dd *Doors) Delete(a *auth.Authorizator, oid schema.OID, dbc db.DBC) ([]schema.Object, error)

func (*Doors) Door

func (dd *Doors) Door(oid schema.OID) (Door, bool)

func (*Doors) Load

func (dd *Doors) Load(blob json.RawMessage) error

func (Doors) Print

func (dd Doors) Print()

func (Doors) Save

func (dd Doors) Save() (json.RawMessage, error)

func (*Doors) Sweep

func (dd *Doors) Sweep(retention time.Duration)

func (*Doors) Update

func (dd *Doors) Update(a *auth.Authorizator, oid schema.OID, value string, dbc db.DBC) ([]schema.Object, error)

func (Doors) Validate

func (dd Doors) Validate() error

type TAuthable added in v0.8.3

type TAuthable interface {
	Door | *Door

	AsRuleEntity() (string, any)
	CacheKey() string
}

Jump to

Keyboard shortcuts

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