blob: e3d0eb2a2d4cd7e33623302de1446a12da1c25b8 [file] [log] [blame]
Ash Wilson0a997f82014-09-03 15:50:52 -04001package endpoints
Ash Wilsonbdfc3302014-09-04 10:16:28 -04002
3import (
4 "errors"
5
6 "github.com/rackspace/gophercloud"
7)
8
9// Interface describes the availability of a specific service endpoint.
10type Interface string
11
12const (
13 // InterfaceAdmin makes an endpoint only available to administrators.
14 InterfaceAdmin Interface = "admin"
15
16 // InterfacePublic makes an endpoint available to everyone.
17 InterfacePublic Interface = "public"
18
19 // InterfaceInternal makes an endpoint only available within the cluster.
20 InterfaceInternal Interface = "internal"
21)
22
23// EndpointOpts contains the subset of Endpoint attributes that should be used to create or update an Endpoint.
24type EndpointOpts struct {
25 Interface Interface
26 Name string
27 Region string
28 URL string
29 ServiceID string
30}
31
32// Create inserts a new Endpoint into the service catalog.
33func Create(client *gophercloud.ServiceClient, opts EndpointOpts) (*Endpoint, error) {
34 return nil, errors.New("Not implemented")
35}
36
37// ListOpts allows finer control over the the endpoints returned by a List call.
38// All fields are optional.
39type ListOpts struct {
40 Interface Interface
41 ServiceID string
42 Page int
43 PerPage int
44}
45
46// List enumerates endpoints in a paginated collection, optionally filtered by ListOpts criteria.
47func List(client *gophercloud.ServiceClient, opts ListOpts) (*EndpointList, error) {
48 return nil, errors.New("Not implemented")
49}
50
51// Update changes an existing endpoint with new data.
52func Update(client *gophercloud.ServiceClient, endpointID string, opts EndpointOpts) (*Endpoint, error) {
53 return nil, errors.New("Not implemented")
54}
55
56// Delete removes an endpoint from the service catalog.
57func Delete(client *gophercloud.ServiceClient, endpointID string) error {
58 return errors.New("Not implemented")
59}