interfaces

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: 1 Imported by: 4

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

Resource is a composition of interfaces required to represent a resource.

type ResourceCreator

type ResourceCreator func(version string) (Resource, error)

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

type ResourceVersioner interface {
	Type() string
	Version() string
}

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.

Jump to

Keyboard shortcuts

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