client

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: 14 Imported by: 0

README

Golang REST client for RackHD ipam

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Address string
	Scheme  string
}

Client struct is used to configure the creation of a client

func NewClient

func NewClient(address string) *Client

NewClient returns a new client

func (*Client) CreatePool

func (c *Client) CreatePool(poolToCreate resources.PoolV1) (string, error)

CreatePool a pool and returns the location.

func (*Client) CreateReservation

func (c *Client) CreateReservation(subnetID string, reservationToCreate resources.ReservationV1) (string, error)

CreateReservation a Reservation and return the location.

func (*Client) CreateShowPool

func (c *Client) CreateShowPool(poolToCreate resources.PoolV1) (resources.PoolV1, error)

CreateShowPool creates a pool and then returns that pool.

func (*Client) CreateShowReservation

func (c *Client) CreateShowReservation(subnetID string, reservationToCreate resources.ReservationV1) (resources.ReservationV1, error)

CreateShowReservation creates a Reservation and then returns that Reservation.

func (*Client) CreateShowSubnet

func (c *Client) CreateShowSubnet(poolID string, subnetToCreate resources.SubnetV1) (resources.SubnetV1, error)

CreateShowSubnet creates a subnet and then returns that subnet.

func (*Client) CreateSubnet

func (c *Client) CreateSubnet(poolID string, subnetToCreate resources.SubnetV1) (string, error)

CreateSubnet a subnet and return the location.

func (*Client) DeletePool

func (c *Client) DeletePool(poolID string, poolToDelete resources.PoolV1) (string, error)

DeletePool removes the requested Pool and returns the location.

func (*Client) DeleteReservation

func (c *Client) DeleteReservation(reservationID string, reservationToDelete resources.ReservationV1) (string, error)

DeleteReservation removed the requested Reservation and returns the location.

func (*Client) DeleteSubnet

func (c *Client) DeleteSubnet(subnetID string, subnetToDelete resources.SubnetV1) (string, error)

DeleteSubnet removed the requested subnet and returns the location.

func (*Client) IndexLeases

func (c *Client) IndexLeases(reservationID string) (resources.LeasesV1, error)

IndexLeases returns a list of Leases.

func (*Client) IndexPools

func (c *Client) IndexPools() (resources.PoolsV1, error)

IndexPools returns a list of Pools.

func (*Client) IndexReservations

func (c *Client) IndexReservations(subnetID string) (resources.ReservationsV1, error)

IndexReservations returns a list of Reservations.

func (*Client) IndexSubnets

func (c *Client) IndexSubnets(poolID string) (resources.SubnetsV1, error)

IndexSubnets returns a list of Subnets.

func (*Client) ReceiveResource

func (c *Client) ReceiveResource(method, path, resourceType, resourceVersion string) (interfaces.Resource, error)

ReceiveResource is used to receive the passed reasource type

func (*Client) SendReceiveResource

func (c *Client) SendReceiveResource(methodSend, methodReceive, path string, in interfaces.Resource) (interfaces.Resource, error)

SendReceiveResource is used to send a resource type and then upon success, fetch and recieve that resource type

func (*Client) SendResource

func (c *Client) SendResource(method, path string, in interfaces.Resource) (string, error)

SendResource is used to send a generic resource type

func (*Client) ShowLease

func (c *Client) ShowLease(leaseID string, leaseToShow resources.LeaseV1) (resources.LeaseV1, error)

ShowLease returns the requested Lease.

func (*Client) ShowPool

func (c *Client) ShowPool(poolID string, poolToShow resources.PoolV1) (resources.PoolV1, error)

ShowPool returns the requested Pool.

func (*Client) ShowReservation

func (c *Client) ShowReservation(reservationID string, reservationToShow resources.ReservationV1) (resources.ReservationV1, error)

ShowReservation returns the requested Reservation.

func (*Client) ShowSubnet

func (c *Client) ShowSubnet(subnetID string, subnetToGet resources.SubnetV1) (resources.SubnetV1, error)

ShowSubnet returns the requested subnet.

func (*Client) UpdateLease

func (c *Client) UpdateLease(leaseID string, leaseToUpdate resources.LeaseV1) (string, error)

UpdateLease updates the requested Lease and returns its location.

func (*Client) UpdatePool

func (c *Client) UpdatePool(poolID string, poolToUpdate resources.PoolV1) (string, error)

UpdatePool updates the requested Pool and returns its location.

func (*Client) UpdateReservation

func (c *Client) UpdateReservation(reservationID string, reservationToUpdate resources.ReservationV1) (string, error)

UpdateReservation updates the requested Reservation and returns its location.

func (*Client) UpdateShowLease

func (c *Client) UpdateShowLease(leaseID string, leaseToUpdate resources.LeaseV1) (resources.LeaseV1, error)

UpdateShowLease updates a Lease and then returns that Lease.

func (*Client) UpdateShowPool

func (c *Client) UpdateShowPool(poolID string, poolToUpdate resources.PoolV1) (resources.PoolV1, error)

UpdateShowPool updates a pool and then returns that pool.

func (*Client) UpdateShowReservation

func (c *Client) UpdateShowReservation(reservationID string, reservationToUpdate resources.ReservationV1) (resources.ReservationV1, error)

UpdateShowReservation updates a Reservation and then returns that Reservation.

func (*Client) UpdateShowSubnet

func (c *Client) UpdateShowSubnet(subnetID string, subnetToUpdate resources.SubnetV1) (resources.SubnetV1, error)

UpdateShowSubnet updates a Subnet and then returns that Subnet.

func (*Client) UpdateSubnet

func (c *Client) UpdateSubnet(subnetID string, subnetToUpdate resources.SubnetV1) (string, error)

UpdateSubnet updates the requested subnet and returns its location.

Jump to

Keyboard shortcuts

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