Documentation ¶
Index ¶
- Constants
- type DBStore
- func (store *DBStore) AddLabel(label, ipRange string) bool
- func (store *DBStore) AllocateIP(ipamLabel, reference string) string
- func (store *DBStore) CleanUpLabel(label string)
- func (store *DBStore) CreateARecord(hostname, ipAddr string) bool
- func (store *DBStore) CreateTables() bool
- func (store *DBStore) DeleteARecord(hostname, ipAddr string) bool
- func (store *DBStore) DisplayIPRecords()
- func (store *DBStore) GetIPAddressFromARecord(ipamLabel, hostname string) string
- func (store *DBStore) GetIPAddressFromReference(ipamLabel, reference string) string
- func (store *DBStore) GetLabelMap() map[string]string
- func (store *DBStore) InsertIPs(ips []string, ipamLabel string)
- func (store *DBStore) ReleaseIP(ip string)
- func (store *DBStore) RemoveLabel(label string) bool
- type StoreProvider
Constants ¶
View Source
const ( ALLOCATED = 0 AVAILABLE = 1 ReferenceLength = 16 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBStore ¶
type DBStore struct {
// contains filtered or unexported fields
}
func (*DBStore) AllocateIP ¶
func (*DBStore) CleanUpLabel ¶ added in v0.1.5
CleanUpLabel performs DELETE CASCADE of associated rows in all tables TODO: Should be replaced by standard DB cascade deletion
func (*DBStore) CreateARecord ¶
func (*DBStore) CreateTables ¶
func (*DBStore) DeleteARecord ¶
func (*DBStore) DisplayIPRecords ¶
func (store *DBStore) DisplayIPRecords()
func (*DBStore) GetIPAddressFromARecord ¶ added in v0.1.5
func (*DBStore) GetIPAddressFromReference ¶ added in v0.1.5
func (*DBStore) GetLabelMap ¶ added in v0.1.5
func (*DBStore) RemoveLabel ¶ added in v0.1.5
type StoreProvider ¶ added in v0.1.5
type StoreProvider interface { CreateTables() bool InsertIPs(ips []string, ipamLabel string) DisplayIPRecords() AllocateIP(ipamLabel, reference string) string ReleaseIP(ip string) GetIPAddressFromARecord(ipamLabel, hostname string) string GetIPAddressFromReference(ipamLabel, reference string) string CreateARecord(hostname, ipAddr string) bool DeleteARecord(hostname, ipAddr string) bool GetLabelMap() map[string]string AddLabel(label, ipRange string) bool RemoveLabel(label string) bool CleanUpLabel(label string) }
func NewStore ¶
func NewStore() StoreProvider
Click to show internal directories.
Click to hide internal directories.