interfaces

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerCardsCount = schema.ControllerCardsCount
View Source
const ControllerCardsStatus = schema.ControllerCardsStatus
View Source
const ControllerDateTimeCurrent = schema.ControllerDateTimeCurrent
View Source
const ControllerDateTimeModified = schema.ControllerDateTimeModified
View Source
const ControllerEndpointAddress = schema.ControllerEndpointAddress
View Source
const ControllerEventsCurrent = schema.ControllerEventsCurrent
View Source
const ControllerEventsFirst = schema.ControllerEventsFirst
View Source
const ControllerEventsLast = schema.ControllerEventsLast
View Source
const ControllerEventsStatus = schema.ControllerEventsStatus
View Source
const ControllerTouched = schema.Touched
View Source
const DoorControl = schema.DoorControl
View Source
const DoorControlConfigured = schema.DoorControlConfigured
View Source
const DoorControlModified = schema.DoorControlModified
View Source
const DoorDelay = schema.DoorDelay
View Source
const DoorDelayConfigured = schema.DoorDelayConfigured
View Source
const DoorDelayModified = schema.DoorDelayModified
View Source
const LANBindAddress = schema.LANBindAddress
View Source
const LANBroadcastAddress = schema.LANBroadcastAddress
View Source
const LANCreated = schema.Created
View Source
const LANDeleted = schema.Deleted
View Source
const LANListenAddress = schema.LANListenAddress
View Source
const LANName = schema.InterfaceName
View Source
const LANStatus = schema.Status
View Source
const LANType = schema.Type
View Source
const MAX = 5

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 Interfaces

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

func NewInterfaces

func NewInterfaces(ch chan types.EventsList) Interfaces

func (*Interfaces) ActivateKeypads added in v0.8.6

func (ii *Interfaces) ActivateKeypads(controller types.IController, keypads map[uint8]bool)

func (*Interfaces) AsObjects

func (ii *Interfaces) AsObjects(a *auth.Authorizator) []schema.Object

func (*Interfaces) Clone

func (ii *Interfaces) Clone() Interfaces

func (*Interfaces) CompareACL

func (ii *Interfaces) CompareACL(controllers []types.IController, permissions acl.ACL, withPIN bool) (map[uint32]acl.Diff, error)

func (*Interfaces) Create

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

func (*Interfaces) Delete

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

func (*Interfaces) DeleteCard

func (ii *Interfaces) DeleteCard(controller types.IController, card uint32)

func (*Interfaces) GetEvents

func (ii *Interfaces) GetEvents(controllers []types.IController, missing map[uint32][]types.Interval)

func (*Interfaces) LAN

func (ii *Interfaces) LAN() (LAN, bool)

func (*Interfaces) Load

func (ii *Interfaces) Load(blob json.RawMessage) error

func (Interfaces) Print

func (ii Interfaces) Print()

func (*Interfaces) PutCard

func (ii *Interfaces) PutCard(controller types.IController, card uint32, PIN uint32, from, to lib.Date, permissions map[uint8]uint8)

func (*Interfaces) Refresh

func (ii *Interfaces) Refresh(controllers []types.IController)

func (Interfaces) Save

func (ii Interfaces) Save() (json.RawMessage, error)

func (*Interfaces) Search

func (ii *Interfaces) Search(controllers []types.IController) []uint32

func (*Interfaces) SetDoor

func (ii *Interfaces) SetDoor(controller types.IController, door uint8, mode lib.ControlState, delay uint8)

func (*Interfaces) SetDoorControl

func (ii *Interfaces) SetDoorControl(controller types.IController, door uint8, mode lib.ControlState)

func (*Interfaces) SetDoorDelay

func (ii *Interfaces) SetDoorDelay(controller types.IController, door uint8, delay uint8)

func (*Interfaces) SetDoorPasscodes added in v0.8.7

func (ii *Interfaces) SetDoorPasscodes(controller types.IController, door uint8, passcodes ...uint32)

func (*Interfaces) SetInterlock added in v0.8.5

func (ii *Interfaces) SetInterlock(controller types.IController, interlock lib.Interlock)

func (*Interfaces) SetTime

func (ii *Interfaces) SetTime(controller types.IController, t time.Time)

func (*Interfaces) Update

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

func (Interfaces) Validate

func (ii Interfaces) Validate() error

type LAN

type LAN struct {
	catalog.CatalogInterface
	Name             string
	BindAddress      lib.BindAddr
	BroadcastAddress lib.BroadcastAddr
	ListenAddress    lib.ListenAddr
	Debug            bool
	// contains filtered or unexported fields
}

func (*LAN) AsObjects

func (l *LAN) AsObjects(a *auth.Authorizator) []schema.Object

func (LAN) AsRuleEntity

func (l LAN) AsRuleEntity() (string, interface{})

func (LAN) CacheKey added in v0.8.10

func (l LAN) CacheKey() string

func (LAN) Clone

func (l LAN) Clone() LAN

func (LAN) IsDeleted

func (l LAN) IsDeleted() bool

func (LAN) IsValid

func (l LAN) IsValid() bool

func (LAN) String

func (l LAN) String() string

type TAuthable added in v0.8.3

type TAuthable interface {
	LAN | *LAN

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

Jump to

Keyboard shortcuts

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