Documentation
¶
Index ¶
- func AddRoutes(router *mux.Router)
- func CreateApp(obj *App) error
- func CreateEndpointGroup(obj *EndpointGroup) error
- func CreateNetwork(obj *Network) error
- func CreatePolicy(obj *Policy) error
- func CreateRule(obj *Rule) error
- func CreateService(obj *Service) error
- func CreateServiceInstance(obj *ServiceInstance) error
- func CreateTenant(obj *Tenant) error
- func CreateVolume(obj *Volume) error
- func CreateVolumeProfile(obj *VolumeProfile) error
- func DeleteApp(key string) error
- func DeleteEndpointGroup(key string) error
- func DeleteNetwork(key string) error
- func DeletePolicy(key string) error
- func DeleteRule(key string) error
- func DeleteService(key string) error
- func DeleteServiceInstance(key string) error
- func DeleteTenant(key string) error
- func DeleteVolume(key string) error
- func DeleteVolumeProfile(key string) error
- func Init()
- func RegisterAppCallbacks(handler AppCallbacks)
- func RegisterEndpointGroupCallbacks(handler EndpointGroupCallbacks)
- func RegisterNetworkCallbacks(handler NetworkCallbacks)
- func RegisterPolicyCallbacks(handler PolicyCallbacks)
- func RegisterRuleCallbacks(handler RuleCallbacks)
- func RegisterServiceCallbacks(handler ServiceCallbacks)
- func RegisterServiceInstanceCallbacks(handler ServiceInstanceCallbacks)
- func RegisterTenantCallbacks(handler TenantCallbacks)
- func RegisterVolumeCallbacks(handler VolumeCallbacks)
- func RegisterVolumeProfileCallbacks(handler VolumeProfileCallbacks)
- func ValidateApp(obj *App) error
- func ValidateEndpointGroup(obj *EndpointGroup) error
- func ValidateNetwork(obj *Network) error
- func ValidatePolicy(obj *Policy) error
- func ValidateRule(obj *Rule) error
- func ValidateService(obj *Service) error
- func ValidateServiceInstance(obj *ServiceInstance) error
- func ValidateTenant(obj *Tenant) error
- func ValidateVolume(obj *Volume) error
- func ValidateVolumeProfile(obj *VolumeProfile) error
- type App
- type AppCallbacks
- type AppLinkSets
- type AppLinks
- type CallbackHandlers
- type Collections
- type EndpointGroup
- type EndpointGroupCallbacks
- type EndpointGroupLinkSets
- type EndpointGroupLinks
- type HttpApiFunc
- type Network
- type NetworkCallbacks
- type NetworkLinkSets
- type NetworkLinks
- type Policy
- type PolicyCallbacks
- type PolicyLinkSets
- type PolicyLinks
- type Rule
- type RuleCallbacks
- type RuleLinkSets
- type Service
- type ServiceCallbacks
- type ServiceInstance
- type ServiceInstanceCallbacks
- type ServiceInstanceLinkSets
- type ServiceInstanceLinks
- type ServiceLinkSets
- type ServiceLinks
- type Tenant
- type TenantCallbacks
- type TenantLinkSets
- type Volume
- type VolumeCallbacks
- type VolumeLinkSets
- type VolumeLinks
- type VolumeProfile
- type VolumeProfileCallbacks
- type VolumeProfileLinkSets
- type VolumeProfileLinks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEndpointGroup ¶
func CreateEndpointGroup(obj *EndpointGroup) error
Create a endpointGroup object
func CreateServiceInstance ¶
func CreateServiceInstance(obj *ServiceInstance) error
Create a serviceInstance object
func CreateVolumeProfile ¶
func CreateVolumeProfile(obj *VolumeProfile) error
Create a volumeProfile object
func DeleteServiceInstance ¶
Delete a serviceInstance object
func RegisterAppCallbacks ¶
func RegisterAppCallbacks(handler AppCallbacks)
func RegisterEndpointGroupCallbacks ¶
func RegisterEndpointGroupCallbacks(handler EndpointGroupCallbacks)
func RegisterNetworkCallbacks ¶
func RegisterNetworkCallbacks(handler NetworkCallbacks)
func RegisterPolicyCallbacks ¶
func RegisterPolicyCallbacks(handler PolicyCallbacks)
func RegisterRuleCallbacks ¶
func RegisterRuleCallbacks(handler RuleCallbacks)
func RegisterServiceCallbacks ¶
func RegisterServiceCallbacks(handler ServiceCallbacks)
func RegisterServiceInstanceCallbacks ¶
func RegisterServiceInstanceCallbacks(handler ServiceInstanceCallbacks)
func RegisterTenantCallbacks ¶
func RegisterTenantCallbacks(handler TenantCallbacks)
func RegisterVolumeCallbacks ¶
func RegisterVolumeCallbacks(handler VolumeCallbacks)
func RegisterVolumeProfileCallbacks ¶
func RegisterVolumeProfileCallbacks(handler VolumeProfileCallbacks)
func ValidateEndpointGroup ¶
func ValidateEndpointGroup(obj *EndpointGroup) error
Validate a endpointGroup object
func ValidateServiceInstance ¶
func ValidateServiceInstance(obj *ServiceInstance) error
Validate a serviceInstance object
func ValidateVolumeProfile ¶
func ValidateVolumeProfile(obj *VolumeProfile) error
Validate a volumeProfile object
Types ¶
type App ¶
type App struct {
// every object has a key
Key string `json:"key,omitempty"`
AppName string `json:"appName,omitempty"`
TenantName string `json:"tenantName,omitempty"`
// add link-sets and links
LinkSets AppLinkSets `json:"link-sets,omitempty"`
Links AppLinks `json:"links,omitempty"`
}
type AppCallbacks ¶
type AppLinkSets ¶
type CallbackHandlers ¶
type CallbackHandlers struct {
AppCb AppCallbacks
EndpointGroupCb EndpointGroupCallbacks
NetworkCb NetworkCallbacks
PolicyCb PolicyCallbacks
RuleCb RuleCallbacks
ServiceCb ServiceCallbacks
ServiceInstanceCb ServiceInstanceCallbacks
TenantCb TenantCallbacks
VolumeCb VolumeCallbacks
VolumeProfileCb VolumeProfileCallbacks
}
type Collections ¶
type Collections struct {
// contains filtered or unexported fields
}
type EndpointGroup ¶
type EndpointGroup struct {
// every object has a key
Key string `json:"key,omitempty"`
EndpointGroupID int `json:"endpointGroupId,omitempty"`
GroupName string `json:"groupName,omitempty"`
NetworkName string `json:"networkName,omitempty"`
Policies []string `json:"policies,omitempty"`
TenantName string `json:"tenantName,omitempty"`
// add link-sets and links
LinkSets EndpointGroupLinkSets `json:"link-sets,omitempty"`
Links EndpointGroupLinks `json:"links,omitempty"`
}
func FindEndpointGroup ¶
func FindEndpointGroup(key string) *EndpointGroup
Return a pointer to endpointGroup from collection
func (*EndpointGroup) Delete ¶
func (self *EndpointGroup) Delete() error
func (*EndpointGroup) GetKey ¶
func (self *EndpointGroup) GetKey() string
func (*EndpointGroup) GetType ¶
func (self *EndpointGroup) GetType() string
func (*EndpointGroup) Read ¶
func (self *EndpointGroup) Read() error
func (*EndpointGroup) Write ¶
func (self *EndpointGroup) Write() error
type EndpointGroupCallbacks ¶
type EndpointGroupCallbacks interface {
EndpointGroupCreate(endpointGroup *EndpointGroup) error
EndpointGroupUpdate(endpointGroup, params *EndpointGroup) error
EndpointGroupDelete(endpointGroup *EndpointGroup) error
}
type EndpointGroupLinkSets ¶
type EndpointGroupLinks ¶
type HttpApiFunc ¶
type Network ¶
type Network struct {
// every object has a key
Key string `json:"key,omitempty"`
DefaultGw string `json:"defaultGw,omitempty"`
Encap string `json:"encap,omitempty"`
IsPrivate bool `json:"isPrivate,omitempty"`
IsPublic bool `json:"isPublic,omitempty"`
NetworkName string `json:"networkName,omitempty"`
Subnet string `json:"subnet,omitempty"`
TenantName string `json:"tenantName,omitempty"`
// add link-sets and links
LinkSets NetworkLinkSets `json:"link-sets,omitempty"`
Links NetworkLinks `json:"links,omitempty"`
}
func FindNetwork ¶
Return a pointer to network from collection
type NetworkCallbacks ¶
type NetworkLinkSets ¶
type NetworkLinks ¶
type Policy ¶
type Policy struct {
// every object has a key
Key string `json:"key,omitempty"`
PolicyName string `json:"policyName,omitempty"`
TenantName string `json:"tenantName,omitempty"`
// add link-sets and links
LinkSets PolicyLinkSets `json:"link-sets,omitempty"`
Links PolicyLinks `json:"links,omitempty"`
}
type PolicyCallbacks ¶
type PolicyLinkSets ¶
type PolicyLinks ¶
type Rule ¶
type Rule struct {
// every object has a key
Key string `json:"key,omitempty"`
Action string `json:"action,omitempty"`
Direction string `json:"direction,omitempty"`
EndpointGroup string `json:"endpointGroup,omitempty"`
IpAddress string `json:"ipAddress,omitempty"`
Network string `json:"network,omitempty"`
PolicyName string `json:"policyName,omitempty"`
Port int `json:"port,omitempty"`
Priority int `json:"priority,omitempty"`
Protocol string `json:"protocol,omitempty"`
RuleID string `json:"ruleId,omitempty"`
TenantName string `json:"tenantName,omitempty"`
// add link-sets and links
LinkSets RuleLinkSets `json:"link-sets,omitempty"`
}
type RuleCallbacks ¶
type RuleLinkSets ¶
type Service ¶
type Service struct {
// every object has a key
Key string `json:"key,omitempty"`
AppName string `json:"appName,omitempty"`
Command string `json:"command,omitempty"`
Cpu string `json:"cpu,omitempty"`
EndpointGroups []string `json:"endpointGroups,omitempty"`
Environment []string `json:"environment,omitempty"`
ImageName string `json:"imageName,omitempty"`
Memory string `json:"memory,omitempty"`
Networks []string `json:"networks,omitempty"`
Scale int `json:"scale,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
TenantName string `json:"tenantName,omitempty"`
VolumeProfile string `json:"volumeProfile,omitempty"`
// add link-sets and links
LinkSets ServiceLinkSets `json:"link-sets,omitempty"`
Links ServiceLinks `json:"links,omitempty"`
}
func FindService ¶
Return a pointer to service from collection
type ServiceCallbacks ¶
type ServiceInstance ¶
type ServiceInstance struct {
// every object has a key
Key string `json:"key,omitempty"`
AppName string `json:"appName,omitempty"`
InstanceID string `json:"instanceId,omitempty"`
ServiceName string `json:"serviceName,omitempty"`
TenantName string `json:"tenantName,omitempty"`
Volumes []string `json:"volumes,omitempty"`
// add link-sets and links
LinkSets ServiceInstanceLinkSets `json:"link-sets,omitempty"`
Links ServiceInstanceLinks `json:"links,omitempty"`
}
func FindServiceInstance ¶
func FindServiceInstance(key string) *ServiceInstance
Return a pointer to serviceInstance from collection
func (*ServiceInstance) Delete ¶
func (self *ServiceInstance) Delete() error
func (*ServiceInstance) GetKey ¶
func (self *ServiceInstance) GetKey() string
func (*ServiceInstance) GetType ¶
func (self *ServiceInstance) GetType() string
func (*ServiceInstance) Read ¶
func (self *ServiceInstance) Read() error
func (*ServiceInstance) Write ¶
func (self *ServiceInstance) Write() error
type ServiceInstanceCallbacks ¶
type ServiceInstanceCallbacks interface {
ServiceInstanceCreate(serviceInstance *ServiceInstance) error
ServiceInstanceUpdate(serviceInstance, params *ServiceInstance) error
ServiceInstanceDelete(serviceInstance *ServiceInstance) error
}
type ServiceInstanceLinkSets ¶
type ServiceInstanceLinks ¶
type ServiceLinkSets ¶
type ServiceLinks ¶
type Tenant ¶
type Tenant struct {
// every object has a key
Key string `json:"key,omitempty"`
DefaultNetwork string `json:"defaultNetwork,omitempty"`
SubnetLen int `json:"subnetLen,omitempty"`
SubnetPool string `json:"subnetPool,omitempty"`
TenantName string `json:"tenantName,omitempty"`
Vlans string `json:"vlans,omitempty"`
Vxlans string `json:"vxlans,omitempty"`
// add link-sets and links
LinkSets TenantLinkSets `json:"link-sets,omitempty"`
}
type TenantCallbacks ¶
type TenantLinkSets ¶
type TenantLinkSets struct {
Apps map[string]modeldb.Link `json:"Apps,omitempty"`
EndpointGroups map[string]modeldb.Link `json:"EndpointGroups,omitempty"`
Networks map[string]modeldb.Link `json:"Networks,omitempty"`
Policies map[string]modeldb.Link `json:"Policies,omitempty"`
VolumeProfiles map[string]modeldb.Link `json:"VolumeProfiles,omitempty"`
Volumes map[string]modeldb.Link `json:"Volumes,omitempty"`
}
type Volume ¶
type Volume struct {
// every object has a key
Key string `json:"key,omitempty"`
DatastoreType string `json:"datastoreType,omitempty"`
MountPoint string `json:"mountPoint,omitempty"`
PoolName string `json:"poolName,omitempty"`
Size string `json:"size,omitempty"`
TenantName string `json:"tenantName,omitempty"`
VolumeName string `json:"volumeName,omitempty"`
// add link-sets and links
LinkSets VolumeLinkSets `json:"link-sets,omitempty"`
Links VolumeLinks `json:"links,omitempty"`
}
type VolumeCallbacks ¶
type VolumeLinkSets ¶
type VolumeLinks ¶
type VolumeProfile ¶
type VolumeProfile struct {
// every object has a key
Key string `json:"key,omitempty"`
DatastoreType string `json:"datastoreType,omitempty"`
MountPoint string `json:"mountPoint,omitempty"`
PoolName string `json:"poolName,omitempty"`
Size string `json:"size,omitempty"`
TenantName string `json:"tenantName,omitempty"`
VolumeProfileName string `json:"volumeProfileName,omitempty"`
// add link-sets and links
LinkSets VolumeProfileLinkSets `json:"link-sets,omitempty"`
Links VolumeProfileLinks `json:"links,omitempty"`
}
func FindVolumeProfile ¶
func FindVolumeProfile(key string) *VolumeProfile
Return a pointer to volumeProfile from collection
func (*VolumeProfile) Delete ¶
func (self *VolumeProfile) Delete() error
func (*VolumeProfile) GetKey ¶
func (self *VolumeProfile) GetKey() string
func (*VolumeProfile) GetType ¶
func (self *VolumeProfile) GetType() string
func (*VolumeProfile) Read ¶
func (self *VolumeProfile) Read() error
func (*VolumeProfile) Write ¶
func (self *VolumeProfile) Write() error
type VolumeProfileCallbacks ¶
type VolumeProfileCallbacks interface {
VolumeProfileCreate(volumeProfile *VolumeProfile) error
VolumeProfileUpdate(volumeProfile, params *VolumeProfile) error
VolumeProfileDelete(volumeProfile *VolumeProfile) error
}
type VolumeProfileLinkSets ¶
type VolumeProfileLinks ¶
Click to show internal directories.
Click to hide internal directories.