Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ipam ¶
type Ipam interface {
Pools
Subnets
Reservations
Leases
}
Ipam interface is a collection of interfaces defined to support each area of business logic. As new interfaces are defined they should be added to the Ipam interface to extend it's capabilities.
type Leases ¶
type Leases interface {
GetLeases(string) ([]models.Lease, error)
GetLease(string) (models.Lease, error)
UpdateLease(models.Lease) error
}
Leases interface defines the methods for implementing Lease related business logic.
type Pools ¶
type Pools interface {
GetPools() ([]models.Pool, error)
GetPool(string) (models.Pool, error)
CreatePool(models.Pool) error
UpdatePool(models.Pool) error
DeletePool(string) error
}
Pools interface defines the methods for implementing Pool related business logic.
type Reservations ¶
type Reservations interface {
GetReservations(string) ([]models.Reservation, error)
GetReservation(string) (models.Reservation, error)
CreateReservation(models.Reservation) error
UpdateReservation(models.Reservation) error
DeleteReservation(string) error
}
Reservations interface defines the methods for implementing Reservation related business logic.
type Resource ¶
type Resource interface {
ResourceMarshaler
ResourceUnmarshaler
ResourceVersioner
}
Resource is a composition of interfaces required to represent a resource.
type ResourceCreator ¶
ResourceCreator is a function signature used for requesting a versioned resource.
type ResourceMarshaler ¶
type ResourceMarshaler interface {
Marshal(interface{}) error
}
ResourceMarshaler marshals a given object to it's internal representation.
type ResourceUnmarshaler ¶
type ResourceUnmarshaler interface {
Unmarshal() (interface{}, error)
}
ResourceUnmarshaler marshals the internal resource representation to a given object (typically a model).
type ResourceVersioner ¶
ResourceVersioner provides methods for obtaining information about a particular resource to be used in content negotiation in HTTP handlers.
type Subnets ¶
type Subnets interface {
GetSubnets(string) ([]models.Subnet, error)
GetSubnet(string) (models.Subnet, error)
CreateSubnet(models.Subnet) error
UpdateSubnet(models.Subnet) error
DeleteSubnet(string) error
}
Subnets interface defines the methods for implementing Subnet related business logic.