Documentation ¶
Index ¶
- Variables
- type Openstack
- func (o *Openstack) ApplicationCredentialRoles() []string
- func (o *Openstack) BlockStorageClient(r *http.Request) (*openstack.BlockStorageClient, error)
- func (o *Openstack) ComputeClient(r *http.Request) (*openstack.ComputeClient, error)
- func (o *Openstack) CreateApplicationCredential(r *http.Request, name string, roles []string) (*applicationcredentials.ApplicationCredential, error)
- func (o *Openstack) CreateServerGroup(r *http.Request, name string) (*servergroups.ServerGroup, error)
- func (o *Openstack) DeleteApplicationCredential(r *http.Request, name string) error
- func (o *Openstack) GetApplicationCredential(r *http.Request, name string) (*applicationcredentials.ApplicationCredential, error)
- func (o *Openstack) GetFlavor(r *http.Request, name string) (*generated.OpenstackFlavor, error)
- func (o *Openstack) GetImage(r *http.Request, name string) (*generated.OpenstackImage, error)
- func (o *Openstack) GetServerGroup(r *http.Request, name string) (*servergroups.ServerGroup, error)
- func (o *Openstack) IdentityClient(r *http.Request) (*openstack.IdentityClient, error)
- func (o *Openstack) ImageClient(r *http.Request) (*openstack.ImageClient, error)
- func (o *Openstack) ListAvailabilityZonesBlockStorage(r *http.Request) (generated.OpenstackAvailabilityZones, error)
- func (o *Openstack) ListAvailabilityZonesCompute(r *http.Request) (generated.OpenstackAvailabilityZones, error)
- func (o *Openstack) ListAvailableProjects(r *http.Request) (generated.OpenstackProjects, error)
- func (o *Openstack) ListExternalNetworks(r *http.Request) (interface{}, error)
- func (o *Openstack) ListFlavors(r *http.Request) (generated.OpenstackFlavors, error)
- func (o *Openstack) ListImages(r *http.Request) (generated.OpenstackImages, error)
- func (o *Openstack) ListKeyPairs(r *http.Request) (generated.OpenstackKeyPairs, error)
- func (o *Openstack) NetworkClient(r *http.Request) (*openstack.NetworkClient, error)
- type Options
- type PublicKeyVar
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPEMDecode is raised when the PEM decode failed for some reason. ErrPEMDecode = errors.New("PEM decode error") // ErrPEMType is raised when the encounter the wrong PEM type, e.g. PKCS#1. ErrPEMType = errors.New("PEM type unsupported") // ErrKeyType is raised when we encounter an unsupported key type. ErrKeyType = errors.New("key type unsupported") )
View Source
var (
ErrResourceNotFound = goerrors.New("resource not found")
)
Functions ¶
This section is empty.
Types ¶
type Openstack ¶
type Openstack struct {
// contains filtered or unexported fields
}
Openstack provides an HTTP handler for Openstack resources.
func New ¶
func New(options *Options, authenticator *authorization.Authenticator) (*Openstack, error)
New returns a new initialized Openstack handler.
func (*Openstack) ApplicationCredentialRoles ¶
func (*Openstack) BlockStorageClient ¶
func (*Openstack) ComputeClient ¶
func (*Openstack) CreateApplicationCredential ¶
func (o *Openstack) CreateApplicationCredential(r *http.Request, name string, roles []string) (*applicationcredentials.ApplicationCredential, error)
func (*Openstack) CreateServerGroup ¶
func (o *Openstack) CreateServerGroup(r *http.Request, name string) (*servergroups.ServerGroup, error)
func (*Openstack) DeleteApplicationCredential ¶
func (*Openstack) GetApplicationCredential ¶
func (o *Openstack) GetApplicationCredential(r *http.Request, name string) (*applicationcredentials.ApplicationCredential, error)
func (*Openstack) GetFlavor ¶
GetFlavor does a list and find, while inefficient, it does do image filtering.
func (*Openstack) GetImage ¶
GetImage does a list and find, while inefficient, it does do image filtering.
func (*Openstack) GetServerGroup ¶
func (o *Openstack) GetServerGroup(r *http.Request, name string) (*servergroups.ServerGroup, error)
func (*Openstack) IdentityClient ¶
func (*Openstack) ImageClient ¶
func (*Openstack) ListAvailabilityZonesBlockStorage ¶
func (*Openstack) ListAvailabilityZonesCompute ¶
func (*Openstack) ListAvailableProjects ¶
ListAvailableProjects lists projects that the token has roles associated with.
func (*Openstack) ListExternalNetworks ¶
func (*Openstack) ListFlavors ¶
func (*Openstack) ListImages ¶
func (*Openstack) ListKeyPairs ¶
func (*Openstack) NetworkClient ¶
type Options ¶
type Options struct { ComputeOptions openstack.ComputeOptions Key PublicKeyVar ServerGroupPolicy string Properties []string // applicationCredentialRoles sets the roles an application credential // is granted on creation. ApplicationCredentialRoles []string }
type PublicKeyVar ¶
type PublicKeyVar struct {
// contains filtered or unexported fields
}
PublicKeyVar contains a public key.
func (*PublicKeyVar) Set ¶
func (v *PublicKeyVar) Set(s string) error
Set accepts a base64 encoded PEM public key and tries to decode it.
func (*PublicKeyVar) String ¶
func (v *PublicKeyVar) String() string
func (*PublicKeyVar) Type ¶
func (v *PublicKeyVar) Type() string
Click to show internal directories.
Click to hide internal directories.