addressable

package
v1.2.2-dev.27 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

******************************************************************************

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

addressable contains functionality for obtaining Addressable data.

addressable contains functionality for obtaining Addressable data.

******************************************************************************

  • Copyright 2019 Dell Inc. *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddExecutor

type AddExecutor interface {
	Execute() (string, error)
}

func NewAddExecutor

func NewAddExecutor(db AddressWriter, addressable contract.Addressable) AddExecutor

This factory method returns an executor used to add an addressable.

type AddressDeleter

type AddressDeleter interface {
	DeleteAddressableById(id string) error

	// This method is needed for testing whether addressables are still in use.
	GetDeviceServicesByAddressableId(id string) ([]contract.DeviceService, error)

	AddressLoader
}

AddressDeleter provides functionality for removing existing Addressables.

type AddressExecutor

type AddressExecutor interface {
	Execute() ([]contract.Addressable, error)
}

AddressExecutor provides functionality for retrieving addresses from an underlying data-store.

func NewAddressExecutor

func NewAddressExecutor(db AddressLoader, address string) AddressExecutor

NewAddressExecutor creates an AddressExecutor.

type AddressLoader

type AddressLoader interface {
	GetAddressables() ([]contract.Addressable, error)
	GetAddressablesByAddress(address string) ([]contract.Addressable, error)
	GetAddressablesByPublisher(p string) ([]contract.Addressable, error)
	GetAddressablesByPort(p int) ([]contract.Addressable, error)
	GetAddressablesByTopic(t string) ([]contract.Addressable, error)
	GetAddressableByName(n string) (contract.Addressable, error)
	GetAddressableById(id string) (contract.Addressable, error)
}

AddressLoader provides functionality for obtaining Addressables.

type AddressUpdater

type AddressUpdater interface {
	UpdateAddressable(addressable contract.Addressable) error

	// This method is needed for testing whether addressables are still in use.
	GetDeviceServicesByAddressableId(id string) ([]contract.DeviceService, error)

	AddressLoader
	AddressWriter
}

AddressUpdater provides functionality for updating existing Addressables.

type AddressWriter

type AddressWriter interface {
	AddAddressable(addressable contract.Addressable) (string, error)
}

AddressWriter provides functionality for adding Addressables.

type AddressableAllExecutor

type AddressableAllExecutor interface {
	Execute() ([]contract.Addressable, error)
}

type DeleteExecutor

type DeleteExecutor interface {
	Execute() error
}

func NewDeleteByIdExecutor

func NewDeleteByIdExecutor(db AddressDeleter, id string) DeleteExecutor

This factory method returns an executor used to delete an addressable by ID.

func NewDeleteByNameExecutor

func NewDeleteByNameExecutor(db AddressDeleter, name string) DeleteExecutor

This factory method returns an executor used to delete an addressable by name.

type IdExecutor

type IdExecutor interface {
	Execute() (contract.Addressable, error)
}

func NewIdExecutor

func NewIdExecutor(db AddressLoader, id string) IdExecutor

type NameExecutor

type NameExecutor interface {
	Execute() (contract.Addressable, error)
}

func NewNameExecutor

func NewNameExecutor(db AddressLoader, name string) NameExecutor

type PortExecutor

type PortExecutor interface {
	Execute() ([]contract.Addressable, error)
}

PortExecutor provides functionality for retrieving addresses from an underlying data-store.

func NewPortExecutor

func NewPortExecutor(db AddressLoader, port int) PortExecutor

NewPortExecutor creates a PortExecutor.

type PublisherExecutor

type PublisherExecutor interface {
	Execute() ([]contract.Addressable, error)
}

PublisherExecutor provides functionality for retrieving addresses from an underlying data-store.

func NewPublisherExecutor

func NewPublisherExecutor(db AddressLoader, publisher string) PublisherExecutor

NewPublisherExecutor creates a PublisherExecutor.

type TopicExecutor

type TopicExecutor interface {
	Execute() ([]contract.Addressable, error)
}

TopicExecutor provides functionality for retrieving addresses from an underlying data-store.

func NewTopicExecutor

func NewTopicExecutor(db AddressLoader, topic string) TopicExecutor

NewTopicExecutor creates a TopicExecutor.

type UpdateExecutor

type UpdateExecutor interface {
	Execute() error
}

func NewUpdateExecutor

func NewUpdateExecutor(updater AddressUpdater, addressable contract.Addressable) UpdateExecutor

This factory method returns an executor used to update an addressable.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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