resources

package
v0.0.0-...-41c1b6c Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const LeaseResourceType string = "application/vnd.ipam.lease"

LeaseResourceType is the media type assigned to a Lease resource.

View Source
const LeaseResourceVersionV1 string = "1.0.0"

LeaseResourceVersionV1 is the semantic version identifier for the Subnet resource.

View Source
const LeasesResourceType string = "application/vnd.ipam.leases"

LeasesResourceType is the media type assigned to a collection of Lease resources.

View Source
const LeasesResourceVersionV1 string = "1.0.0"

LeasesResourceVersionV1 is the semantic version identifier for the Pool resource.

View Source
const PoolResourceType string = "application/vnd.ipam.pool"

PoolResourceType is the media type assigned to a Pool resource.

View Source
const PoolResourceVersionV1 string = "1.0.0"

PoolResourceVersionV1 is the semantic version identifier for the Pool resource.

View Source
const PoolsResourceType string = "application/vnd.ipam.pools"

PoolsResourceType is the media type assigned to a collection of Pool resources.

View Source
const PoolsResourceVersionV1 string = "1.0.0"

PoolsResourceVersionV1 is the semantic version identifier for the Pool resource.

View Source
const ReservationResourceType string = "application/vnd.ipam.reservation"

ReservationResourceType is the media type assigned to a Reservation resource.

View Source
const ReservationResourceVersionV1 string = "1.0.0"

ReservationResourceVersionV1 is the semantic version identifier for the Subnet resource.

View Source
const ReservationsResourceType string = "application/vnd.ipam.reservations"

ReservationsResourceType is the media type assigned to a collection of Reservation resources.

View Source
const ReservationsResourceVersionV1 string = "1.0.0"

ReservationsResourceVersionV1 is the semantic version identifier for the Pool resource.

View Source
const SubnetResourceType string = "application/vnd.ipam.subnet"

SubnetResourceType is the media type assigned to a Subnet resource.

View Source
const SubnetResourceVersionV1 string = "1.0.0"

SubnetResourceVersionV1 is the semantic version identifier for the Pool resource.

View Source
const SubnetsResourceType string = "application/vnd.ipam.subnets"

SubnetsResourceType is the media type assigned to a collection of Subnet resources.

View Source
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.

func (*LeaseV1) Marshal

func (s *LeaseV1) Marshal(object interface{}) error

Marshal converts a models.Lease object into this version of the resource.

func (*LeaseV1) Type

func (s *LeaseV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*LeaseV1) Unmarshal

func (s *LeaseV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into a models.Lease object.

func (*LeaseV1) Version

func (s *LeaseV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

type LeasesV1

type LeasesV1 struct {
	Leases []LeaseV1 `json:"leases"`
}

LeasesV1 represents the v1.0.0 version of the Leases resource.

func (*LeasesV1) Marshal

func (p *LeasesV1) Marshal(object interface{}) error

Marshal converts an array of models.Lease objects into this version of the resource.

func (*LeasesV1) Type

func (p *LeasesV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*LeasesV1) Unmarshal

func (p *LeasesV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into an array of models.Lease objects.

func (*LeasesV1) Version

func (p *LeasesV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

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.

func (*PoolV1) Marshal

func (p *PoolV1) Marshal(object interface{}) error

Marshal converts a models.Pool object into this version of the resource.

func (*PoolV1) Type

func (p *PoolV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*PoolV1) Unmarshal

func (p *PoolV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into a models.Pool object.

func (*PoolV1) Version

func (p *PoolV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

type PoolsV1

type PoolsV1 struct {
	Pools []PoolV1 `json:"pools"`
}

PoolsV1 represents the v1.0.0 version of the Pools resource.

func (*PoolsV1) Marshal

func (p *PoolsV1) Marshal(object interface{}) error

Marshal converts an array of models.Pool objects into this version of the resource.

func (*PoolsV1) Type

func (p *PoolsV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*PoolsV1) Unmarshal

func (p *PoolsV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into an array of models.Pool objects.

func (*PoolsV1) Version

func (p *PoolsV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

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

func (s *SubnetV1) Marshal(object interface{}) error

Marshal converts a models.Subnet object into this version of the resource.

func (*SubnetV1) Type

func (s *SubnetV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*SubnetV1) Unmarshal

func (s *SubnetV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into a models.Subnet object.

func (*SubnetV1) Version

func (s *SubnetV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

type SubnetsV1

type SubnetsV1 struct {
	Subnets []SubnetV1 `json:"subnets"`
}

SubnetsV1 represents the v1.0.0 version of the Subnets resource.

func (*SubnetsV1) Marshal

func (p *SubnetsV1) Marshal(object interface{}) error

Marshal converts an array of models.Subnet objects into this version of the resource.

func (*SubnetsV1) Type

func (p *SubnetsV1) Type() string

Type returns the resource type for use in rendering HTTP response headers.

func (*SubnetsV1) Unmarshal

func (p *SubnetsV1) Unmarshal() (interface{}, error)

Unmarshal converts the resource into an array of models.Subnet objects.

func (*SubnetsV1) Version

func (p *SubnetsV1) Version() string

Version returns the resource version for use in rendering HTTP response headers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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