datastore

package
v0.0.0-...-1a29ab9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	GetManagementSubnet(ctx context.Context) (*dhcpd.Subnet, error)
	GetServiceSubnet(ctx context.Context) (*dhcpd.Subnet, error)
	CreateManagementSubnet(ctx context.Context, network types.IPNet, start, end types.IP) (*dhcpd.Subnet, error)
	CreateServiceSubnet(ctx context.Context, network types.IPNet, start, end, gateway, dnsServer types.IP) (*dhcpd.Subnet, error)

	GetLeaseByID(ctx context.Context, id int) (*httpd.Lease, error)
	GetLeaseFromManagementSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)
	GetLeaseFromServiceSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)
	CreateLeaseFromManagementSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)
	CreateLeaseFromServiceSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)

	RegisterHost(ctx context.Context, serverID uuid.UUID, serial, product, manufacturer string, serviceLeaseID, managementLeaseID int) (*httpd.Host, error)
	GetHostByAddress(ctx context.Context, address types.IP) (*httpd.Host, error)

	ListUser(ctx context.Context) ([]httpd.User, error)
	ListKeyByUserID(ctx context.Context, userID int) ([]httpd.Key, error)

	Close() error
}

Datastore is an interface for usra to perform CRUD operations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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