Documentation ¶
Overview ¶
Package vmwareavi contains logic specific for working with VMware AVI devices
Index ¶
- Constants
- type ClientServices
- type ConfigureInstallationEndpointRequest
- type DiscoveryService
- type GetTargetConfigurationRequest
- type GetTargetConfigurationResponse
- type InstallCertificateBundleRequest
- type InstallCertificateBundleResponse
- type TargetConfiguration
- type TestConnectionRequest
- type TestConnectionResponse
- type VMwareAviClientsImpl
- func (c *VMwareAviClientsImpl) Close(client *domain.Client)
- func (c *VMwareAviClientsImpl) Connect(client *domain.Client) error
- func (c *VMwareAviClientsImpl) CreateSSLKeyAndCertificate(client *domain.Client, obj *models.SSLKeyAndCertificate, ...) (*models.SSLKeyAndCertificate, error)
- func (c *VMwareAviClientsImpl) GetAllSSLKeysAndCertificates(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.SSLKeyAndCertificate, error)
- func (c *VMwareAviClientsImpl) GetAllTenants(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.Tenant, error)
- func (c *VMwareAviClientsImpl) GetAllVirtualServices(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.VirtualService, error)
- func (c *VMwareAviClientsImpl) GetSSLKeyAndCertificateByID(client *domain.Client, uuid string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error)
- func (c *VMwareAviClientsImpl) GetSSLKeyAndCertificateByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error)
- func (c *VMwareAviClientsImpl) GetVirtualServiceByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
- func (c *VMwareAviClientsImpl) NewClient(connection *domain.Connection, tenant string) *domain.Client
- func (c *VMwareAviClientsImpl) UpdateVirtualService(client *domain.Client, obj *models.VirtualService, ...) (*models.VirtualService, error)
- type WebhookServiceImpl
- func (svc *WebhookServiceImpl) HandleConfigureInstallationEndpoint(c echo.Context) error
- func (svc *WebhookServiceImpl) HandleDiscoverCertificates(c echo.Context) error
- func (svc *WebhookServiceImpl) HandleGetTargetConfiguration(c echo.Context) error
- func (svc *WebhookServiceImpl) HandleInstallCertificateBundle(c echo.Context) error
- func (svc *WebhookServiceImpl) HandleTestConnection(c echo.Context) error
Constants ¶
const ( // SslCertificateTypeCA is the value for a certificate type that is for a certificate authority SslCertificateTypeCA = "SSL_CERTIFICATE_TYPE_CA" // SslCertificateTypeVirtualService is the value for a certificate type for a virtual service SslCertificateTypeVirtualService = "SSL_CERTIFICATE_TYPE_VIRTUALSERVICE" )
const (
// DefaultTenantName represents the default tenant
DefaultTenantName = "admin"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientServices ¶
type ClientServices interface { // Close will ... Close(client *domain.Client) // Connect will ... Connect(client *domain.Client) error // CreateSSLKeyAndCertificate will create a new SSLKeyAndCertificate object CreateSSLKeyAndCertificate(client *domain.Client, obj *models.SSLKeyAndCertificate, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error) // GetAllSSLKeysAndCertificates will return a collection of SSLKeyAndCertificate objects GetAllSSLKeysAndCertificates(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.SSLKeyAndCertificate, error) // GetAllTenants will return a collection of Tenant objects GetAllTenants(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.Tenant, error) // GetAllVirtualServices will return a collection of VirtualService objects GetAllVirtualServices(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.VirtualService, error) // GetSSLKeyAndCertificateById will return an existing SSLKeyAndCertificate by name GetSSLKeyAndCertificateByID(client *domain.Client, uuid string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error) // GetSSLKeyAndCertificateByName will return an existing SSLKeyAndCertificate by name GetSSLKeyAndCertificateByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error) // GetVirtualServiceByName will return an existing VirtualService by name GetVirtualServiceByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.VirtualService, error) // NewClient will create a new client instance NewClient(connection *domain.Connection, tenant string) *domain.Client // UpdateVirtualService will update an existing VirtualService object UpdateVirtualService(client *domain.Client, obj *models.VirtualService, options ...session.ApiOptionsParams) (*models.VirtualService, error) }
ClientServices interfaces for interacting with VMware AVI
type ConfigureInstallationEndpointRequest ¶
type ConfigureInstallationEndpointRequest struct { Connection *domain.Connection `json:"connection"` Keystore domain.Keystore `json:"keystore"` Binding domain.Binding `json:"binding"` }
ConfigureInstallationEndpointRequest contains the request details for configuring usage of a keystore
type DiscoveryService ¶
type DiscoveryService interface {
DiscoverCertificates(c echo.Context) error
}
DiscoveryService interfaces for connector discovery functions
type GetTargetConfigurationRequest ¶
type GetTargetConfigurationRequest struct {
Connection *domain.Connection `json:"connection"`
}
GetTargetConfigurationRequest contains the request details for retrieving VMware AVI host configuration information
type GetTargetConfigurationResponse ¶
type GetTargetConfigurationResponse struct {
TargetConfiguration TargetConfiguration `json:"targetConfiguration"`
}
GetTargetConfigurationResponse contains the response for a GetTargetConfigurationRequest
type InstallCertificateBundleRequest ¶
type InstallCertificateBundleRequest struct { Connection *domain.Connection `json:"connection"` CertificateBundle domain.CertificateBundle `json:"certificateBundle"` InstallationKeystore domain.Keystore `json:"keystore"` }
InstallCertificateBundleRequest contains the request details for installing a certificate, issuing chain and private key
type InstallCertificateBundleResponse ¶
type InstallCertificateBundleResponse struct {
InstallationKeystore domain.Keystore `json:"keystore"`
}
InstallCertificateBundleResponse contains the response for an InstallCertificateBundleRequest
type TargetConfiguration ¶
type TargetConfiguration struct { }
TargetConfiguration contains the details of a VMware AVI host configuration
type TestConnectionRequest ¶
type TestConnectionRequest struct {
Connection *domain.Connection `json:"connection"`
}
TestConnectionRequest contains the request details for testing connectivity with a VMware AVI host
type TestConnectionResponse ¶
type TestConnectionResponse struct {
Result bool `json:"result"`
}
TestConnectionResponse contains the response for a TestConnectionRequest
type VMwareAviClientsImpl ¶
type VMwareAviClientsImpl struct { }
VMwareAviClientsImpl implementation of ClientServices
func NewVMwareAviClients ¶
func NewVMwareAviClients() *VMwareAviClientsImpl
NewVMwareAviClients will return a new VMware AVI client
func (*VMwareAviClientsImpl) Close ¶
func (c *VMwareAviClientsImpl) Close(client *domain.Client)
Close will logout the client session
func (*VMwareAviClientsImpl) Connect ¶
func (c *VMwareAviClientsImpl) Connect(client *domain.Client) error
Connect will attempt to create a new client session and connect to the VMware AVI host
func (*VMwareAviClientsImpl) CreateSSLKeyAndCertificate ¶
func (c *VMwareAviClientsImpl) CreateSSLKeyAndCertificate(client *domain.Client, obj *models.SSLKeyAndCertificate, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error)
CreateSSLKeyAndCertificate will create a new SSLKeyAndCertificate object
func (*VMwareAviClientsImpl) GetAllSSLKeysAndCertificates ¶
func (c *VMwareAviClientsImpl) GetAllSSLKeysAndCertificates(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.SSLKeyAndCertificate, error)
GetAllSSLKeysAndCertificates will return a collection of SSLKeyAndCertificate objects
func (*VMwareAviClientsImpl) GetAllTenants ¶
func (c *VMwareAviClientsImpl) GetAllTenants(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.Tenant, error)
GetAllTenants will return a collection of Tenant objects
func (*VMwareAviClientsImpl) GetAllVirtualServices ¶
func (c *VMwareAviClientsImpl) GetAllVirtualServices(client *domain.Client, options ...session.ApiOptionsParams) ([]*models.VirtualService, error)
GetAllVirtualServices will return a collection of VirtualService objects
func (*VMwareAviClientsImpl) GetSSLKeyAndCertificateByID ¶
func (c *VMwareAviClientsImpl) GetSSLKeyAndCertificateByID(client *domain.Client, uuid string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error)
GetSSLKeyAndCertificateByID will return an existing SSLKeyAndCertificate by name
func (*VMwareAviClientsImpl) GetSSLKeyAndCertificateByName ¶
func (c *VMwareAviClientsImpl) GetSSLKeyAndCertificateByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.SSLKeyAndCertificate, error)
GetSSLKeyAndCertificateByName will return an existing SSLKeyAndCertificate by name
func (*VMwareAviClientsImpl) GetVirtualServiceByName ¶
func (c *VMwareAviClientsImpl) GetVirtualServiceByName(client *domain.Client, name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
GetVirtualServiceByName will return an existing VirtualService by name
func (*VMwareAviClientsImpl) NewClient ¶
func (c *VMwareAviClientsImpl) NewClient(connection *domain.Connection, tenant string) *domain.Client
NewClient will create a new client instance
func (*VMwareAviClientsImpl) UpdateVirtualService ¶
func (c *VMwareAviClientsImpl) UpdateVirtualService(client *domain.Client, obj *models.VirtualService, options ...session.ApiOptionsParams) (*models.VirtualService, error)
UpdateVirtualService will update an existing VirtualService object
type WebhookServiceImpl ¶
type WebhookServiceImpl struct { ClientServices ClientServices Discovery DiscoveryService }
WebhookServiceImpl implementation of DiscoveryService
func NewWebhookService ¶
func NewWebhookService(clientServices ClientServices, discovery DiscoveryService) *WebhookServiceImpl
NewWebhookService will return a new WebhookServiceImpl
func (*WebhookServiceImpl) HandleConfigureInstallationEndpoint ¶
func (svc *WebhookServiceImpl) HandleConfigureInstallationEndpoint(c echo.Context) error
HandleConfigureInstallationEndpoint will attempt to configure usage of a keystore
func (*WebhookServiceImpl) HandleDiscoverCertificates ¶
func (svc *WebhookServiceImpl) HandleDiscoverCertificates(c echo.Context) error
HandleDiscoverCertificates will attempt to perform a discovery of the VMware AVI certificates and usage
func (*WebhookServiceImpl) HandleGetTargetConfiguration ¶
func (svc *WebhookServiceImpl) HandleGetTargetConfiguration(c echo.Context) error
HandleGetTargetConfiguration will attempt to retrieve the configuration information of the VMware AVI host
func (*WebhookServiceImpl) HandleInstallCertificateBundle ¶
func (svc *WebhookServiceImpl) HandleInstallCertificateBundle(c echo.Context) error
HandleInstallCertificateBundle will attempt to install a certificate, issuing chain and private key
func (*WebhookServiceImpl) HandleTestConnection ¶
func (svc *WebhookServiceImpl) HandleTestConnection(c echo.Context) error
HandleTestConnection will attempt to connect to a VMware AVI host