Documentation ¶
Index ¶
- Constants
- func LeaseCreator(version string) (interfaces.Resource, error)
- func LeasesCreator(version string) (interfaces.Resource, error)
- func PoolCreator(version string) (interfaces.Resource, error)
- func PoolsCreator(version string) (interfaces.Resource, error)
- func ReservationCreator(version string) (interfaces.Resource, error)
- func ReservationsCreator(version string) (interfaces.Resource, error)
- func SubnetCreator(version string) (interfaces.Resource, error)
- func SubnetsCreator(version string) (interfaces.Resource, error)
- type LeaseV1
- type LeasesV1
- type PoolV1
- type PoolsV1
- type ReservationV1
- type ReservationsV1
- type SubnetV1
- type SubnetsV1
Constants ¶
const LeaseResourceType string = "application/vnd.ipam.lease"
LeaseResourceType is the media type assigned to a Lease resource.
const LeaseResourceVersionV1 string = "1.0.0"
LeaseResourceVersionV1 is the semantic version identifier for the Subnet resource.
const LeasesResourceType string = "application/vnd.ipam.leases"
LeasesResourceType is the media type assigned to a collection of Lease resources.
const LeasesResourceVersionV1 string = "1.0.0"
LeasesResourceVersionV1 is the semantic version identifier for the Pool resource.
const PoolResourceType string = "application/vnd.ipam.pool"
PoolResourceType is the media type assigned to a Pool resource.
const PoolResourceVersionV1 string = "1.0.0"
PoolResourceVersionV1 is the semantic version identifier for the Pool resource.
const PoolsResourceType string = "application/vnd.ipam.pools"
PoolsResourceType is the media type assigned to a collection of Pool resources.
const PoolsResourceVersionV1 string = "1.0.0"
PoolsResourceVersionV1 is the semantic version identifier for the Pool resource.
const ReservationResourceType string = "application/vnd.ipam.reservation"
ReservationResourceType is the media type assigned to a Reservation resource.
const ReservationResourceVersionV1 string = "1.0.0"
ReservationResourceVersionV1 is the semantic version identifier for the Subnet resource.
const ReservationsResourceType string = "application/vnd.ipam.reservations"
ReservationsResourceType is the media type assigned to a collection of Reservation resources.
const ReservationsResourceVersionV1 string = "1.0.0"
ReservationsResourceVersionV1 is the semantic version identifier for the Pool resource.
const SubnetResourceType string = "application/vnd.ipam.subnet"
SubnetResourceType is the media type assigned to a Subnet resource.
const SubnetResourceVersionV1 string = "1.0.0"
SubnetResourceVersionV1 is the semantic version identifier for the Pool resource.
const SubnetsResourceType string = "application/vnd.ipam.subnets"
SubnetsResourceType is the media type assigned to a collection of Subnet resources.
const SubnetsResourceVersionV1 string = "1.0.0"
SubnetsResourceVersionV1 is the semantic version identifier for the Pool resource.
Variables ¶
This section is empty.
Functions ¶
func LeaseCreator ¶
func LeaseCreator(version string) (interfaces.Resource, error)
LeaseCreator is a factory function for turning a version string into a Lease resource.
func LeasesCreator ¶
func LeasesCreator(version string) (interfaces.Resource, error)
LeasesCreator is a factory function for turning a version string into a Leases resource.
func PoolCreator ¶
func PoolCreator(version string) (interfaces.Resource, error)
PoolCreator is a factory function for turning a version string into a Pool resource.
func PoolsCreator ¶
func PoolsCreator(version string) (interfaces.Resource, error)
PoolsCreator is a factory function for turning a version string into a Pools resource.
func ReservationCreator ¶
func ReservationCreator(version string) (interfaces.Resource, error)
ReservationCreator is a factory function for turning a version string into a Reservation resource.
func ReservationsCreator ¶
func ReservationsCreator(version string) (interfaces.Resource, error)
ReservationsCreator is a factory function for turning a version string into a Reservations resource.
func SubnetCreator ¶
func SubnetCreator(version string) (interfaces.Resource, error)
SubnetCreator is a factory function for turning a version string into a Subnet resource.
func SubnetsCreator ¶
func SubnetsCreator(version string) (interfaces.Resource, error)
SubnetsCreator is a factory function for turning a version string into a Subnets resource.
Types ¶
type LeaseV1 ¶
type LeaseV1 struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` Metadata interface{} `json:"metadata"` Subnet string `json:"subnet"` //SubnetID Reservation string `json:"reservation"` //ReservationID Address string `json:"address"` }
LeaseV1 represents the v1.0.0 version of the Lease resource.
type LeasesV1 ¶
type LeasesV1 struct {
Leases []LeaseV1 `json:"leases"`
}
LeasesV1 represents the v1.0.0 version of the Leases resource.
func (*LeasesV1) Marshal ¶
Marshal converts an array of models.Lease objects into this version of the resource.
type PoolV1 ¶
type PoolV1 struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` Metadata interface{} `json:"metadata"` }
PoolV1 represents the v1.0.0 version of the Pool resource.
type PoolsV1 ¶
type PoolsV1 struct {
Pools []PoolV1 `json:"pools"`
}
PoolsV1 represents the v1.0.0 version of the Pools resource.
func (*PoolsV1) Marshal ¶
Marshal converts an array of models.Pool objects into this version of the resource.
type ReservationV1 ¶
type ReservationV1 struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` Metadata interface{} `json:"metadata"` Subnet string `json:"subnet"` //Subnet ID }
ReservationV1 represents the v1.0.0 version of the Reservation resource.
func (*ReservationV1) Marshal ¶
func (s *ReservationV1) Marshal(object interface{}) error
Marshal converts a models.Reservation object into this version of the resource.
func (*ReservationV1) Type ¶
func (s *ReservationV1) Type() string
Type returns the resource type for use in rendering HTTP response headers.
func (*ReservationV1) Unmarshal ¶
func (s *ReservationV1) Unmarshal() (interface{}, error)
Unmarshal converts the resource into a models.Reservation object.
func (*ReservationV1) Version ¶
func (s *ReservationV1) Version() string
Version returns the resource version for use in rendering HTTP response headers.
type ReservationsV1 ¶
type ReservationsV1 struct {
Reservations []ReservationV1 `json:"reservations"`
}
ReservationsV1 represents the v1.0.0 version of the Reservations resource.
func (*ReservationsV1) Marshal ¶
func (p *ReservationsV1) Marshal(object interface{}) error
Marshal converts an array of models.Reservation objects into this version of the resource.
func (*ReservationsV1) Type ¶
func (p *ReservationsV1) Type() string
Type returns the resource type for use in rendering HTTP response headers.
func (*ReservationsV1) Unmarshal ¶
func (p *ReservationsV1) Unmarshal() (interface{}, error)
Unmarshal converts the resource into an array of models.Reservation objects.
func (*ReservationsV1) Version ¶
func (p *ReservationsV1) Version() string
Version returns the resource version for use in rendering HTTP response headers.
type SubnetV1 ¶
type SubnetV1 struct { ID string `json:"id"` Name string `json:"name"` Tags []string `json:"tags"` Metadata interface{} `json:"metadata"` Pool string `json:"pool"` //PoolID Start string `json:"start"` End string `json:"end"` }
SubnetV1 represents the v1.0.0 version of the Subnet resource.
func (*SubnetV1) Marshal ¶
Marshal converts a models.Subnet object into this version of the resource.
type SubnetsV1 ¶
type SubnetsV1 struct {
Subnets []SubnetV1 `json:"subnets"`
}
SubnetsV1 represents the v1.0.0 version of the Subnets resource.
func (*SubnetsV1) Marshal ¶
Marshal converts an array of models.Subnet objects into this version of the resource.