publisher

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VoidPublisherError = errors.New("try to use void publisher")

Functions

This section is empty.

Types

type AspectCommand

type AspectCommand struct {
	Command string        `json:"command"`
	Id      string        `json:"id"`
	Owner   string        `json:"owner"`
	Aspect  models.Aspect `json:"aspect"`
}

type CharacteristicCommand

type CharacteristicCommand struct {
	Command        string                `json:"command"`
	Id             string                `json:"id"`
	Owner          string                `json:"owner"`
	Characteristic models.Characteristic `json:"characteristic"`
}

type CommandWithRights

type CommandWithRights = permmodel.CommandWithRights

type ConceptCommand

type ConceptCommand struct {
	Command string         `json:"command"`
	Id      string         `json:"id"`
	Owner   string         `json:"owner"`
	Concept models.Concept `json:"concept"`
}

type DeviceClassCommand

type DeviceClassCommand struct {
	Command     string             `json:"command"`
	Id          string             `json:"id"`
	Owner       string             `json:"owner"`
	DeviceClass models.DeviceClass `json:"device_class"`
}

type DeviceCommand

type DeviceCommand struct {
	Command string        `json:"command"`
	Id      string        `json:"id"`
	Owner   string        `json:"owner"`
	Device  models.Device `json:"device"`
}

type DeviceGroupCommand

type DeviceGroupCommand struct {
	Command     string             `json:"command"`
	Id          string             `json:"id"`
	Owner       string             `json:"owner"`
	DeviceGroup models.DeviceGroup `json:"device_group"`
}

type DeviceTypeCommand

type DeviceTypeCommand struct {
	Command    string            `json:"command"`
	Id         string            `json:"id"`
	Owner      string            `json:"owner"`
	DeviceType models.DeviceType `json:"device_type"`
}

type FunctionCommand

type FunctionCommand struct {
	Command  string          `json:"command"`
	Id       string          `json:"id"`
	Owner    string          `json:"owner"`
	Function models.Function `json:"function"`
}

type HubCommand

type HubCommand struct {
	Command string     `json:"command"`
	Id      string     `json:"id"`
	Owner   string     `json:"owner"`
	Hub     models.Hub `json:"hub"`
}

type KeySeparationBalancer

type KeySeparationBalancer struct {
	SubBalancer kafka.Balancer
	Seperator   string
}

func (*KeySeparationBalancer) Balance

func (this *KeySeparationBalancer) Balance(msg kafka.Message, partitions ...int) (partition int)

type LocationCommand

type LocationCommand struct {
	Command  string          `json:"command"`
	Id       string          `json:"id"`
	Owner    string          `json:"owner"`
	Location models.Location `json:"location"`
}

type ProtocolCommand

type ProtocolCommand struct {
	Command  string          `json:"command"`
	Id       string          `json:"id"`
	Owner    string          `json:"owner"`
	Protocol models.Protocol `json:"protocol"`
}

type Publisher

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

func New

func New(conf config.Config, ctx context.Context) (*Publisher, error)

func (*Publisher) PublishAspect

func (this *Publisher) PublishAspect(aspect models.Aspect, userId string) (err error)

func (*Publisher) PublishAspectCommand

func (this *Publisher) PublishAspectCommand(cmd AspectCommand) error

func (*Publisher) PublishAspectDelete

func (this *Publisher) PublishAspectDelete(id string, userId string) error

func (*Publisher) PublishCharacteristic

func (this *Publisher) PublishCharacteristic(characteristic models.Characteristic, userId string) (err error)

func (*Publisher) PublishCharacteristicCommand

func (this *Publisher) PublishCharacteristicCommand(cmd CharacteristicCommand) error

func (*Publisher) PublishCharacteristicDelete

func (this *Publisher) PublishCharacteristicDelete(id string, userId string) error

func (*Publisher) PublishConcept

func (this *Publisher) PublishConcept(concept models.Concept, userId string) (err error)

func (*Publisher) PublishConceptCommand

func (this *Publisher) PublishConceptCommand(cmd ConceptCommand) error

func (*Publisher) PublishConceptDelete

func (this *Publisher) PublishConceptDelete(id string, userId string) error

func (*Publisher) PublishDevice

func (this *Publisher) PublishDevice(device models.Device, userId string) (err error)

func (*Publisher) PublishDeviceClass

func (this *Publisher) PublishDeviceClass(deviceClass models.DeviceClass, userId string) (err error)

func (*Publisher) PublishDeviceClassCommand

func (this *Publisher) PublishDeviceClassCommand(cmd DeviceClassCommand) error

func (*Publisher) PublishDeviceClassDelete

func (this *Publisher) PublishDeviceClassDelete(id string, userId string) error

func (*Publisher) PublishDeviceCommand

func (this *Publisher) PublishDeviceCommand(cmd DeviceCommand) error

func (*Publisher) PublishDeviceDelete

func (this *Publisher) PublishDeviceDelete(id string, userId string) error

func (*Publisher) PublishDeviceGroup

func (this *Publisher) PublishDeviceGroup(group models.DeviceGroup, userId string) (err error)

func (*Publisher) PublishDeviceGroupCommand

func (this *Publisher) PublishDeviceGroupCommand(cmd DeviceGroupCommand) error

func (*Publisher) PublishDeviceGroupDelete

func (this *Publisher) PublishDeviceGroupDelete(id string, userId string) error

func (*Publisher) PublishDeviceType

func (this *Publisher) PublishDeviceType(device models.DeviceType, userId string) (err error)

func (*Publisher) PublishDeviceTypeCommand

func (this *Publisher) PublishDeviceTypeCommand(cmd DeviceTypeCommand) error

func (*Publisher) PublishDeviceTypeDelete

func (this *Publisher) PublishDeviceTypeDelete(id string, userId string) error

func (*Publisher) PublishFunction

func (this *Publisher) PublishFunction(function models.Function, userId string) (err error)

func (*Publisher) PublishFunctionCommand

func (this *Publisher) PublishFunctionCommand(cmd FunctionCommand) error

func (*Publisher) PublishFunctionDelete

func (this *Publisher) PublishFunctionDelete(id string, userId string) error

func (*Publisher) PublishHub

func (this *Publisher) PublishHub(hub models.Hub, userId string) (err error)

func (*Publisher) PublishHubCommand

func (this *Publisher) PublishHubCommand(cmd HubCommand) error

func (*Publisher) PublishHubDelete

func (this *Publisher) PublishHubDelete(id string, userId string) error

func (*Publisher) PublishLocation

func (this *Publisher) PublishLocation(Location models.Location, userId string) (err error)

func (*Publisher) PublishLocationCommand

func (this *Publisher) PublishLocationCommand(cmd LocationCommand) error

func (*Publisher) PublishLocationDelete

func (this *Publisher) PublishLocationDelete(id string, userId string) error

func (*Publisher) PublishProtocol

func (this *Publisher) PublishProtocol(protocol models.Protocol, userId string) (err error)

func (*Publisher) PublishProtocolCommand

func (this *Publisher) PublishProtocolCommand(cmd ProtocolCommand) error

func (*Publisher) PublishProtocolDelete

func (this *Publisher) PublishProtocolDelete(id string, userId string) error

func (*Publisher) PublishRights

func (this *Publisher) PublishRights(kind string, id string, element permmodel.ResourceRightsBase) error

type Void

type Void struct{}

func (Void) PublishAspect

func (this Void) PublishAspect(device models.Aspect, userID string) (err error)

func (Void) PublishAspectDelete

func (this Void) PublishAspectDelete(id string, userID string) error

func (Void) PublishCharacteristic

func (this Void) PublishCharacteristic(characteristic models.Characteristic, userID string) (err error)

func (Void) PublishCharacteristicDelete

func (this Void) PublishCharacteristicDelete(id string, userID string) error

func (Void) PublishConcept

func (this Void) PublishConcept(concept models.Concept, userID string) (err error)

func (Void) PublishConceptDelete

func (this Void) PublishConceptDelete(id string, userID string) error

func (Void) PublishDevice

func (this Void) PublishDevice(device models.Device, userID string) (err error)

func (Void) PublishDeviceClass

func (this Void) PublishDeviceClass(device models.DeviceClass, userID string) (err error)

func (Void) PublishDeviceClassDelete

func (this Void) PublishDeviceClassDelete(id string, userID string) error

func (Void) PublishDeviceDelete

func (this Void) PublishDeviceDelete(id string, userID string) error

func (Void) PublishDeviceGroup

func (this Void) PublishDeviceGroup(device models.DeviceGroup, userID string) (err error)

func (Void) PublishDeviceGroupDelete

func (this Void) PublishDeviceGroupDelete(id string, userID string) error

func (Void) PublishDeviceType

func (this Void) PublishDeviceType(device models.DeviceType, userID string) (err error)

func (Void) PublishDeviceTypeDelete

func (this Void) PublishDeviceTypeDelete(id string, userID string) error

func (Void) PublishFunction

func (this Void) PublishFunction(device models.Function, userID string) (err error)

func (Void) PublishFunctionDelete

func (this Void) PublishFunctionDelete(id string, userID string) error

func (Void) PublishHub

func (this Void) PublishHub(hub models.Hub, userID string) (err error)

func (Void) PublishHubDelete

func (this Void) PublishHubDelete(id string, userID string) error

func (Void) PublishLocation

func (this Void) PublishLocation(device models.Location, userID string) (err error)

func (Void) PublishLocationDelete

func (this Void) PublishLocationDelete(id string, userID string) error

func (Void) PublishProtocol

func (this Void) PublishProtocol(device models.Protocol, userID string) (err error)

func (Void) PublishProtocolDelete

func (this Void) PublishProtocolDelete(id string, userID string) error

func (Void) PublishRights

func (this Void) PublishRights(kind string, id string, element permmodel.ResourceRightsBase) error

Jump to

Keyboard shortcuts

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