Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { UUID uuid.UUID `db:"uuid"` IP types.IP `db:"ip"` SubnetID uuid.UUID `db:"subnet_id"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
A Address is address IP address information
type DHCPLease ¶
type DHCPLease struct { MacAddress types.HardwareAddr `db:"mac_address"` IP types.IP `db:"ip"` Network types.IPNet `db:"network"` Gateway *types.IP `db:"gateway"` DNSServer *types.IP `db:"dns_server"` MetadataServer *types.IP `db:"metadata_server"` }
A DHCPLease is DHCP response information
type IPAM ¶
type IPAM interface { CreateSubnet(ctx context.Context, name string, vlanID uint32, prefix, start, end, gateway, dnsServer, metadataServer string) (*Subnet, error) GetSubnet(ctx context.Context, uuid uuid.UUID) (*Subnet, error) ListSubnet(ctx context.Context) ([]Subnet, error) DeleteSubnet(ctx context.Context, uuid uuid.UUID) error CreateAddress(ctx context.Context, subnetID uuid.UUID) (*Address, error) CreateFixedAddress(ctx context.Context, subnetID uuid.UUID, fixedIP net.IP) (*Address, error) GetAddress(ctx context.Context, uuid uuid.UUID) (*Address, error) ListAddressBySubnetID(ctx context.Context, subnetID uuid.UUID) ([]Address, error) DeleteAddress(ctx context.Context, uuid uuid.UUID) error CreateLease(ctx context.Context, addressID uuid.UUID) (*Lease, error) GetLease(ctx context.Context, leaseID uuid.UUID) (*Lease, error) ListLease(ctx context.Context) ([]Lease, error) DeleteLease(ctx context.Context, leaseID uuid.UUID) error }
IPAM is interface of IP address management operation.
type Lease ¶
type Lease struct { UUID uuid.UUID `db:"uuid"` MacAddress types.HardwareAddr `db:"mac_address"` AddressID uuid.UUID `db:"address_id"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
A Lease is DHCP lease information
type Subnet ¶
type Subnet struct { UUID uuid.UUID `db:"uuid"` Name string `db:"name"` VLANID uint32 `db:"vlan_id"` Network types.IPNet `db:"network"` Start types.IP `db:"start"` End types.IP `db:"end"` Gateway *types.IP `db:"gateway"` DNSServer *types.IP `db:"dns_server"` MetadataServer *types.IP `db:"metadata_server"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
A Subnet is subnet information
Click to show internal directories.
Click to hide internal directories.