mock

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDBStore

type MockDBStore struct {
	Data MockData
}

func NewMockStore

func NewMockStore(data MockData) *MockDBStore

func (*MockDBStore) AddLabel

func (ms *MockDBStore) AddLabel(label, ipRange string) bool

func (*MockDBStore) AllocateIP

func (ms *MockDBStore) AllocateIP(ipamLabel, reference string) string

func (*MockDBStore) CleanUpLabel

func (ms *MockDBStore) CleanUpLabel(label string)

func (*MockDBStore) CreateARecord

func (ms *MockDBStore) CreateARecord(hostname, ipAddr string) bool

func (*MockDBStore) CreateTables

func (ms *MockDBStore) CreateTables() bool

func (*MockDBStore) DeleteARecord

func (ms *MockDBStore) DeleteARecord(hostname, ipAddr string) bool

func (*MockDBStore) DisplayIPRecords

func (ms *MockDBStore) DisplayIPRecords()

func (*MockDBStore) GetIPAddressFromARecord

func (ms *MockDBStore) GetIPAddressFromARecord(ipamLabel, hostname string) string

func (*MockDBStore) GetIPAddressFromReference

func (ms *MockDBStore) GetIPAddressFromReference(ipamLabel, reference string) string

func (*MockDBStore) GetLabelMap

func (ms *MockDBStore) GetLabelMap() map[string]string

func (*MockDBStore) InsertIPs

func (ms *MockDBStore) InsertIPs(ips []string, ipamLabel string)

func (*MockDBStore) ReleaseIP

func (ms *MockDBStore) ReleaseIP(ip string)

func (*MockDBStore) RemoveLabel

func (ms *MockDBStore) RemoveLabel(label string) bool

type MockData

type MockData struct {
	IPAMLabelMap map[string]string
	CleanUpFlag  bool
	Hostdata     map[string]string
	IpList       []string

	LabelData map[string]string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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