Documentation ¶
Index ¶
- Variables
- type DynamoDBStore
- func (db *DynamoDBStore) IPReservation() *IPReservationStore
- func (db *DynamoDBStore) InitializeTables() error
- func (db *DynamoDBStore) InventoryNode() *InventoryNodeStore
- func (db *DynamoDBStore) Network() *NetworkStore
- func (db *DynamoDBStore) Node() *NodeStore
- func (db *DynamoDBStore) System() *SystemStore
- type DynamoDBStoreTable
- type DynamoDBStoreTableMap
- type DynamoDBTableLookup
- type IPReservationStore
- func (db *IPReservationStore) CreateIPReservation(r *types.IPReservation) error
- func (db *IPReservationStore) CreateOrUpdateIPReservation(r *types.IPReservation) error
- func (db *IPReservationStore) CreateRandomIPReservation(r *types.IPReservation, subnet *types.Subnet) (*types.IPReservation, error)
- func (db *IPReservationStore) Delete(r *types.IPReservation) error
- func (db *IPReservationStore) Exists(r *types.IPReservation) (bool, error)
- func (db *IPReservationStore) GetAllIPReservations() (types.IPReservationList, error)
- func (db *IPReservationStore) GetExistingIPReservationInSubnet(subnetCidr *net.IPNet, mac net.HardwareAddr) (*types.IPReservation, error)
- func (db *IPReservationStore) GetIPReservation(ipNet *net.IPNet) (*types.IPReservation, error)
- func (db *IPReservationStore) GetIPReservations(ipNet *net.IPNet) (types.IPReservationList, error)
- func (db *IPReservationStore) GetIPReservationsByMac(mac net.HardwareAddr) (types.IPReservationList, error)
- func (db *IPReservationStore) ObjCreate(obj interface{}) error
- func (db *IPReservationStore) ObjDelete(obj interface{}) error
- func (db *IPReservationStore) ObjExists(obj interface{}) (bool, error)
- func (db *IPReservationStore) ObjUpdate(obj interface{}) error
- func (db *IPReservationStore) UpdateIPReservation(r *types.IPReservation) error
- type IPReservationTable
- func (t *IPReservationTable) Create(db *DynamoDBStore, obj interface{}) error
- func (t *IPReservationTable) GetCreateTableInput() *dynamodb.CreateTableInput
- func (t *IPReservationTable) GetItemQueryInputFrom(o interface{}) (*dynamodb.QueryInput, error)
- func (t *IPReservationTable) GetKeyAttributeDefinitions() []*dynamodb.AttributeDefinition
- func (t *IPReservationTable) GetKeyFrom(o interface{}) (map[string]*dynamodb.AttributeValue, error)
- func (t *IPReservationTable) GetKeySchema() []*dynamodb.KeySchemaElement
- func (t *IPReservationTable) GetName() string
- func (t *IPReservationTable) GetPartitionKeyName() string
- func (t *IPReservationTable) Update(db *DynamoDBStore, obj interface{}) error
- type InventoryNodeStore
- type NetworkStore
- func (db *NetworkStore) Create(network *types.Network) error
- func (db *NetworkStore) Delete(network *types.Network) error
- func (db *NetworkStore) Exists(network *types.Network) (bool, error)
- func (db *NetworkStore) GetNetworkByID(id string) (*types.Network, error)
- func (db *NetworkStore) GetNetworks() (map[string]*types.Network, error)
- func (db *NetworkStore) ObjCreate(obj interface{}) error
- func (db *NetworkStore) ObjDelete(obj interface{}) error
- func (db *NetworkStore) ObjExists(obj interface{}) (bool, error)
- func (db *NetworkStore) ObjUpdate(obj interface{}) error
- func (db *NetworkStore) Update(network *types.Network) error
- type NodeMacIndexEntry
- type NodeStore
- func (db *NodeStore) Create(newNode *types.Node) error
- func (db *NodeStore) Delete(node *types.Node) error
- func (db *NodeStore) Exists(node *types.Node) (bool, error)
- func (db *NodeStore) GetNodeByID(id string) (*types.Node, error)
- func (db *NodeStore) GetNodeByMAC(mac net.HardwareAddr) (*types.Node, error)
- func (db *NodeStore) GetNodes() (map[string]*types.Node, error)
- func (db *NodeStore) ObjCreate(obj interface{}) error
- func (db *NodeStore) ObjDelete(obj interface{}) error
- func (db *NodeStore) ObjExists(obj interface{}) (bool, error)
- func (db *NodeStore) ObjUpdate(obj interface{}) error
- func (db *NodeStore) Update(updatedNode *types.Node) error
- type SimpleDynamoDBInventoryTable
- func (t *SimpleDynamoDBInventoryTable) GetCreateTableInput() *dynamodb.CreateTableInput
- func (t *SimpleDynamoDBInventoryTable) GetItemQueryInputFrom(o interface{}) (*dynamodb.QueryInput, error)
- func (t *SimpleDynamoDBInventoryTable) GetKeyAttributeDefinitions() []*dynamodb.AttributeDefinition
- func (t *SimpleDynamoDBInventoryTable) GetKeyFrom(o interface{}) (map[string]*dynamodb.AttributeValue, error)
- func (t *SimpleDynamoDBInventoryTable) GetKeySchema() []*dynamodb.KeySchemaElement
- func (t *SimpleDynamoDBInventoryTable) GetName() string
- func (t *SimpleDynamoDBInventoryTable) GetPartitionKeyName() string
- type SimpleTableItem
- type SystemStore
- func (db *SystemStore) Create(system *types.System) error
- func (db *SystemStore) Delete(system *types.System) error
- func (db *SystemStore) Exists(system *types.System) (bool, error)
- func (db *SystemStore) GetSystemByID(id string) (*types.System, error)
- func (db *SystemStore) GetSystems() (map[string]*types.System, error)
- func (db *SystemStore) ObjCreate(obj interface{}) error
- func (db *SystemStore) ObjDelete(obj interface{}) error
- func (db *SystemStore) ObjExists(obj interface{}) (bool, error)
- func (db *SystemStore) ObjUpdate(obj interface{}) error
- func (db *SystemStore) Update(system *types.System) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DynamoDBStore ¶
type DynamoDBStore struct {
// contains filtered or unexported fields
}
func NewDynamoDBStore ¶
func NewDynamoDBStore(db *dynamodb.DynamoDB, tableMap DynamoDBTableLookup) *DynamoDBStore
NewDynamoDBStore creates a DynamoDBStore
func (*DynamoDBStore) IPReservation ¶
func (db *DynamoDBStore) IPReservation() *IPReservationStore
func (*DynamoDBStore) InitializeTables ¶
func (db *DynamoDBStore) InitializeTables() error
func (*DynamoDBStore) InventoryNode ¶
func (db *DynamoDBStore) InventoryNode() *InventoryNodeStore
func (*DynamoDBStore) Network ¶
func (db *DynamoDBStore) Network() *NetworkStore
func (*DynamoDBStore) Node ¶
func (db *DynamoDBStore) Node() *NodeStore
func (*DynamoDBStore) System ¶
func (db *DynamoDBStore) System() *SystemStore
type DynamoDBStoreTable ¶
type DynamoDBStoreTable interface { GetName() string GetCreateTableInput() *dynamodb.CreateTableInput GetKeySchema() []*dynamodb.KeySchemaElement GetPartitionKeyName() string GetKeyAttributeDefinitions() []*dynamodb.AttributeDefinition GetKeyFrom(interface{}) (map[string]*dynamodb.AttributeValue, error) GetItemQueryInputFrom(interface{}) (*dynamodb.QueryInput, error) }
DynamoDBStoreTable defines an interface for describing a dynamodb table
type DynamoDBStoreTableMap ¶
type DynamoDBStoreTableMap map[reflect.Type]DynamoDBStoreTable
DynamoDBStoreTableMap maps data types to the appropriate table within DynamoDB
func (DynamoDBStoreTableMap) LookupTable ¶
func (m DynamoDBStoreTableMap) LookupTable(t interface{}) DynamoDBStoreTable
LookupTable finds the table name associated with the type of the interface.
func (DynamoDBStoreTableMap) Tables ¶
func (m DynamoDBStoreTableMap) Tables() []DynamoDBStoreTable
type DynamoDBTableLookup ¶
type DynamoDBTableLookup interface { LookupTable(interface{}) DynamoDBStoreTable Tables() []DynamoDBStoreTable }
type IPReservationStore ¶
type IPReservationStore struct {
*DynamoDBStore
}
func (*IPReservationStore) CreateIPReservation ¶
func (db *IPReservationStore) CreateIPReservation(r *types.IPReservation) error
func (*IPReservationStore) CreateOrUpdateIPReservation ¶
func (db *IPReservationStore) CreateOrUpdateIPReservation(r *types.IPReservation) error
func (*IPReservationStore) CreateRandomIPReservation ¶
func (db *IPReservationStore) CreateRandomIPReservation(r *types.IPReservation, subnet *types.Subnet) (*types.IPReservation, error)
func (*IPReservationStore) Delete ¶
func (db *IPReservationStore) Delete(r *types.IPReservation) error
func (*IPReservationStore) Exists ¶
func (db *IPReservationStore) Exists(r *types.IPReservation) (bool, error)
func (*IPReservationStore) GetAllIPReservations ¶
func (db *IPReservationStore) GetAllIPReservations() (types.IPReservationList, error)
func (*IPReservationStore) GetExistingIPReservationInSubnet ¶
func (db *IPReservationStore) GetExistingIPReservationInSubnet(subnetCidr *net.IPNet, mac net.HardwareAddr) (*types.IPReservation, error)
func (*IPReservationStore) GetIPReservation ¶
func (db *IPReservationStore) GetIPReservation(ipNet *net.IPNet) (*types.IPReservation, error)
func (*IPReservationStore) GetIPReservations ¶
func (db *IPReservationStore) GetIPReservations(ipNet *net.IPNet) (types.IPReservationList, error)
GetIPReservations returns all current reservations in the specified subnet
func (*IPReservationStore) GetIPReservationsByMac ¶
func (db *IPReservationStore) GetIPReservationsByMac(mac net.HardwareAddr) (types.IPReservationList, error)
func (*IPReservationStore) ObjCreate ¶
func (db *IPReservationStore) ObjCreate(obj interface{}) error
func (*IPReservationStore) ObjDelete ¶
func (db *IPReservationStore) ObjDelete(obj interface{}) error
func (*IPReservationStore) ObjExists ¶
func (db *IPReservationStore) ObjExists(obj interface{}) (bool, error)
func (*IPReservationStore) ObjUpdate ¶
func (db *IPReservationStore) ObjUpdate(obj interface{}) error
func (*IPReservationStore) UpdateIPReservation ¶
func (db *IPReservationStore) UpdateIPReservation(r *types.IPReservation) error
type IPReservationTable ¶
type IPReservationTable struct {
Name string
}
func (*IPReservationTable) Create ¶
func (t *IPReservationTable) Create(db *DynamoDBStore, obj interface{}) error
func (*IPReservationTable) GetCreateTableInput ¶
func (t *IPReservationTable) GetCreateTableInput() *dynamodb.CreateTableInput
func (*IPReservationTable) GetItemQueryInputFrom ¶
func (t *IPReservationTable) GetItemQueryInputFrom(o interface{}) (*dynamodb.QueryInput, error)
func (*IPReservationTable) GetKeyAttributeDefinitions ¶
func (t *IPReservationTable) GetKeyAttributeDefinitions() []*dynamodb.AttributeDefinition
func (*IPReservationTable) GetKeyFrom ¶
func (t *IPReservationTable) GetKeyFrom(o interface{}) (map[string]*dynamodb.AttributeValue, error)
func (*IPReservationTable) GetKeySchema ¶
func (t *IPReservationTable) GetKeySchema() []*dynamodb.KeySchemaElement
func (*IPReservationTable) GetName ¶
func (t *IPReservationTable) GetName() string
func (*IPReservationTable) GetPartitionKeyName ¶
func (t *IPReservationTable) GetPartitionKeyName() string
func (*IPReservationTable) Update ¶
func (t *IPReservationTable) Update(db *DynamoDBStore, obj interface{}) error
type InventoryNodeStore ¶
type InventoryNodeStore struct {
*DynamoDBStore
}
func (*InventoryNodeStore) GetInventoryNodeByID ¶
func (db *InventoryNodeStore) GetInventoryNodeByID(id string) (*types.InventoryNode, error)
func (*InventoryNodeStore) GetInventoryNodeByMAC ¶
func (db *InventoryNodeStore) GetInventoryNodeByMAC(mac net.HardwareAddr) (*types.InventoryNode, error)
func (*InventoryNodeStore) GetInventoryNodes ¶
func (db *InventoryNodeStore) GetInventoryNodes() (map[string]*types.InventoryNode, error)
type NetworkStore ¶
type NetworkStore struct {
*DynamoDBStore
}
func (*NetworkStore) GetNetworkByID ¶
func (db *NetworkStore) GetNetworkByID(id string) (*types.Network, error)
func (*NetworkStore) GetNetworks ¶
func (db *NetworkStore) GetNetworks() (map[string]*types.Network, error)
func (*NetworkStore) ObjCreate ¶
func (db *NetworkStore) ObjCreate(obj interface{}) error
func (*NetworkStore) ObjDelete ¶
func (db *NetworkStore) ObjDelete(obj interface{}) error
func (*NetworkStore) ObjExists ¶
func (db *NetworkStore) ObjExists(obj interface{}) (bool, error)
func (*NetworkStore) ObjUpdate ¶
func (db *NetworkStore) ObjUpdate(obj interface{}) error
type NodeMacIndexEntry ¶
type NodeMacIndexEntry struct { Mac net.HardwareAddr LastUpdated time.Time NodeID string }
func (*NodeMacIndexEntry) ID ¶
func (i *NodeMacIndexEntry) ID() string
func (*NodeMacIndexEntry) SetTimestamp ¶
func (i *NodeMacIndexEntry) SetTimestamp(timestamp time.Time)
func (*NodeMacIndexEntry) Timestamp ¶
func (i *NodeMacIndexEntry) Timestamp() int64
type SimpleDynamoDBInventoryTable ¶
type SimpleDynamoDBInventoryTable struct {
Name string
}
func (*SimpleDynamoDBInventoryTable) GetCreateTableInput ¶
func (t *SimpleDynamoDBInventoryTable) GetCreateTableInput() *dynamodb.CreateTableInput
func (*SimpleDynamoDBInventoryTable) GetItemQueryInputFrom ¶
func (t *SimpleDynamoDBInventoryTable) GetItemQueryInputFrom(o interface{}) (*dynamodb.QueryInput, error)
func (*SimpleDynamoDBInventoryTable) GetKeyAttributeDefinitions ¶
func (t *SimpleDynamoDBInventoryTable) GetKeyAttributeDefinitions() []*dynamodb.AttributeDefinition
func (*SimpleDynamoDBInventoryTable) GetKeyFrom ¶
func (t *SimpleDynamoDBInventoryTable) GetKeyFrom(o interface{}) (map[string]*dynamodb.AttributeValue, error)
func (*SimpleDynamoDBInventoryTable) GetKeySchema ¶
func (t *SimpleDynamoDBInventoryTable) GetKeySchema() []*dynamodb.KeySchemaElement
func (*SimpleDynamoDBInventoryTable) GetName ¶
func (t *SimpleDynamoDBInventoryTable) GetName() string
func (*SimpleDynamoDBInventoryTable) GetPartitionKeyName ¶
func (t *SimpleDynamoDBInventoryTable) GetPartitionKeyName() string
type SimpleTableItem ¶
type SimpleTableItem interface {
ID() string
}
type SystemStore ¶
type SystemStore struct {
*DynamoDBStore
}
func (*SystemStore) GetSystemByID ¶
func (db *SystemStore) GetSystemByID(id string) (*types.System, error)
func (*SystemStore) GetSystems ¶
func (db *SystemStore) GetSystems() (map[string]*types.System, error)
func (*SystemStore) ObjCreate ¶
func (db *SystemStore) ObjCreate(obj interface{}) error
func (*SystemStore) ObjDelete ¶
func (db *SystemStore) ObjDelete(obj interface{}) error
func (*SystemStore) ObjExists ¶
func (db *SystemStore) ObjExists(obj interface{}) (bool, error)
func (*SystemStore) ObjUpdate ¶
func (db *SystemStore) ObjUpdate(obj interface{}) error
Click to show internal directories.
Click to hide internal directories.