sqlite

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, dsn, hostnamePrefix string) (datastore.Datastore, error)

New is

Types

type SQLite

type SQLite struct {
	// contains filtered or unexported fields
}

SQLite is

func (*SQLite) Close

func (s *SQLite) Close() error

Close closes the database connections.

func (*SQLite) CreateLeaseFromManagementSubnet

func (s *SQLite) CreateLeaseFromManagementSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)

CreateLeaseFromManagementSubnet is

func (*SQLite) CreateLeaseFromServiceSubnet

func (s *SQLite) CreateLeaseFromServiceSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)

CreateLeaseFromServiceSubnet is

func (*SQLite) CreateManagementSubnet

func (s *SQLite) CreateManagementSubnet(ctx context.Context, network types.IPNet, start, end types.IP) (*dhcpd.Subnet, error)

CreateManagementSubnet is

func (*SQLite) CreateServiceSubnet

func (s *SQLite) CreateServiceSubnet(ctx context.Context, network types.IPNet, start, end, gateway, dnsServer types.IP) (*dhcpd.Subnet, error)

CreateServiceSubnet is

func (*SQLite) GetHostByAddress

func (s *SQLite) GetHostByAddress(ctx context.Context, address types.IP) (*httpd.Host, error)

GetHostByAddress is

func (*SQLite) GetLeaseByID

func (s *SQLite) GetLeaseByID(ctx context.Context, id int) (*httpd.Lease, error)

GetLeaseByID is

func (*SQLite) GetLeaseFromManagementSubnet

func (s *SQLite) GetLeaseFromManagementSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)

GetLeaseFromManagementSubnet is

func (*SQLite) GetLeaseFromServiceSubnet

func (s *SQLite) GetLeaseFromServiceSubnet(ctx context.Context, mac types.HardwareAddr) (*dhcpd.Lease, error)

GetLeaseFromServiceSubnet is

func (*SQLite) GetManagementSubnet

func (s *SQLite) GetManagementSubnet(ctx context.Context) (*dhcpd.Subnet, error)

GetManagementSubnet is

func (*SQLite) GetServiceSubnet

func (s *SQLite) GetServiceSubnet(ctx context.Context) (*dhcpd.Subnet, error)

GetServiceSubnet is

func (*SQLite) ListKeyByUserID

func (s *SQLite) ListKeyByUserID(ctx context.Context, userID int) ([]httpd.Key, error)

ListKeyByUserID is

func (*SQLite) ListUser

func (s *SQLite) ListUser(ctx context.Context) ([]httpd.User, error)

ListUser is

func (*SQLite) RegisterHost

func (s *SQLite) RegisterHost(ctx context.Context, serverID uuid.UUID, serial, product, manufacturer string, serviceLeaseID, managementLeaseID int) (*httpd.Host, error)

RegisterHost is

Jump to

Keyboard shortcuts

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