catalog

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteT

func DeleteT[T CatalogType](v T, oid schema.OID)

func Find

func Find(prefix schema.OID, suffix schema.Suffix, value any) (schema.OID, bool)

func FindController

func FindController(deviceID uint32) schema.OID

func GetBool

func GetBool(oid schema.OID, suffix schema.Suffix) (bool, bool)

func GetDoorDeviceDoor

func GetDoorDeviceDoor(door schema.OID) uint8

func GetDoorDeviceID

func GetDoorDeviceID(door schema.OID) uint32

func GetDoors

func GetDoors() []schema.OID

func GetGroups

func GetGroups() []schema.OID

func GetUint8

func GetUint8(oid schema.OID, suffix schema.Suffix) (uint8, bool)

func GetV

func GetV(oid schema.OID, suffix schema.Suffix) interface{}

func HasGroup

func HasGroup(oid schema.OID) bool

func Init

func Init(c Catalog)

func Join

func Join(p *[]schema.Object, q ...schema.Object)

func NewObject

func NewObject(oid schema.OID, value any) schema.Object

func NewObject2

func NewObject2(oid schema.OID, suffix schema.Suffix, value any) schema.Object

func NewT

func NewT[T CatalogType](v T) schema.OID

func Put

func Put(oid schema.OID, v any)

func PutT

func PutT[T CatalogType](v T)

func PutV

func PutV(oid schema.OID, suffix schema.Suffix, v any)

Types

type Catalog

type Catalog interface {
	NewT(any) schema.OID
	PutT(any, schema.OID)
	DeleteT(any, schema.OID)
	ListT(schema.OID) []schema.OID
	HasT(any, schema.OID) bool

	GetV(schema.OID, schema.Suffix) any
	Put(schema.OID, any)
	PutV(schema.OID, schema.Suffix, any)

	Find(prefix schema.OID, suffix schema.Suffix, value any) (schema.OID, bool)
	FindController(v CatalogController) schema.OID

	GetDoorDeviceID(door schema.OID) uint32
	GetDoorDeviceDoor(door schema.OID) uint8
}

type CatalogCard

type CatalogCard struct {
	OID    schema.OID
	CardID uint32
}

func (CatalogCard) TypeOf

func (t CatalogCard) TypeOf() Type

type CatalogController

type CatalogController struct {
	OID      schema.OID
	DeviceID uint32
}

func (CatalogController) TypeOf

func (t CatalogController) TypeOf() Type

type CatalogDoor

type CatalogDoor struct {
	OID schema.OID
}

func (CatalogDoor) TypeOf

func (t CatalogDoor) TypeOf() Type

type CatalogEvent

type CatalogEvent struct {
	OID      schema.OID
	DeviceID uint32
	Index    uint32
}

func (CatalogEvent) TypeOf

func (t CatalogEvent) TypeOf() Type

type CatalogGroup

type CatalogGroup struct {
	OID schema.OID
}

func (CatalogGroup) TypeOf

func (t CatalogGroup) TypeOf() Type

type CatalogInterface

type CatalogInterface struct {
	OID schema.OID
}

func (CatalogInterface) TypeOf

func (t CatalogInterface) TypeOf() Type

type CatalogLogEntry

type CatalogLogEntry struct {
	OID schema.OID
}

func (CatalogLogEntry) TypeOf

func (t CatalogLogEntry) TypeOf() Type

type CatalogType

type CatalogType interface {
	CatalogInterface |
		CatalogController |
		CatalogDoor |
		CatalogCard |
		CatalogGroup |
		CatalogEvent |
		CatalogLogEntry |
		CatalogUser
	// contains filtered or unexported methods
}

type CatalogUser

type CatalogUser struct {
	OID schema.OID
}

func (CatalogUser) TypeOf

func (t CatalogUser) TypeOf() Type

type Type

type Type int
const (
	TInterface Type = iota
	TController
	TDoor
	TCard
	TGroup
	TEvent
	TLogEntry
	TUser
)

func (Type) String

func (t Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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