Documentation ¶
Index ¶
- Constants
- Variables
- func ComparableToGroup(group Comparable) *model.Group
- func ComparableToGroups(groups []Comparable) []model.Group
- func ComparableToRule(rule Comparable) *model.Rule
- func ComparableToRules(rules []Comparable) []model.Rule
- func ComparableToSecurityPolicy(sp Comparable) *model.SecurityPolicy
- func ComparableToShare(share Comparable) *model.Share
- func ComparableToShares(shares []Comparable) []model.Share
- type Comparable
- type Group
- type GroupStore
- type ProjectShare
- type Rule
- type RuleStore
- type SecurityPolicy
- type SecurityPolicyService
- func (service *SecurityPolicyService) BuildPeerTags(obj *v1alpha1.SecurityPolicy, peers *[]v1alpha1.SecurityPolicyPeer, idx int, ...) []model.Tag
- func (service *SecurityPolicyService) Cleanup() error
- func (service *SecurityPolicyService) CreateOrUpdateSecurityPolicy(obj *v1alpha1.SecurityPolicy) error
- func (service *SecurityPolicyService) DeleteSecurityPolicy(obj interface{}, isVpcCleanup bool) error
- func (service *SecurityPolicyService) ListSecurityPolicyID() sets.String
- func (service *SecurityPolicyService) ResolveNamespace(lbs *meta1.LabelSelector) (*v1.NamespaceList, error)
- func (service *SecurityPolicyService) WrapHierarchyProjectGroups(groups []model.Group) (*model.Infra, error)
- func (service *SecurityPolicyService) WrapHierarchyProjectShares(shares []model.Share) (*model.Infra, error)
- func (service *SecurityPolicyService) WrapHierarchySecurityPolicy(sp *model.SecurityPolicy, gs []model.Group) (*model.Infra, error)
- func (service *SecurityPolicyService) WrapHierarchyVpcSecurityPolicy(sp *model.SecurityPolicy, gs []model.Group, vpcInfo *common.VPCResourceInfo) (*model.OrgRoot, error)
- type SecurityPolicyStore
- type Share
- type ShareStore
Constants ¶
Variables ¶
View Source
var ( String = common.String Int64 = common.Int64 )
View Source
var ( MarkedForDelete = true EnforceRevisionCheckParam = false ResourceTypeSecurityPolicy = common.ResourceTypeSecurityPolicy ResourceTypeRule = common.ResourceTypeRule ResourceTypeGroup = common.ResourceTypeGroup NewConverter = common.NewConverter )
Functions ¶
func ComparableToGroup ¶
func ComparableToGroup(group Comparable) *model.Group
func ComparableToGroups ¶
func ComparableToGroups(groups []Comparable) []model.Group
func ComparableToRule ¶
func ComparableToRule(rule Comparable) *model.Rule
func ComparableToRules ¶
func ComparableToRules(rules []Comparable) []model.Rule
func ComparableToSecurityPolicy ¶
func ComparableToSecurityPolicy(sp Comparable) *model.SecurityPolicy
func ComparableToShare ¶
func ComparableToShare(share Comparable) *model.Share
func ComparableToShares ¶
func ComparableToShares(shares []Comparable) []model.Share
Types ¶
type Comparable ¶
type Comparable = common.Comparable
func GroupsToComparable ¶
func GroupsToComparable(groups []model.Group) []Comparable
func RulesToComparable ¶
func RulesToComparable(rules []model.Rule) []Comparable
func SecurityPolicyToComparable ¶
func SecurityPolicyToComparable(sp *model.SecurityPolicy) Comparable
func ShareToComparable ¶
func ShareToComparable(share *model.Share) Comparable
func SharesToComparable ¶
func SharesToComparable(shares []model.Share) []Comparable
type GroupStore ¶
type GroupStore struct {
common.ResourceStore
}
GroupStore is a store for groups referenced by security policy or rule
func (*GroupStore) Apply ¶ added in v0.0.1
func (groupStore *GroupStore) Apply(i interface{}) error
func (*GroupStore) GetByIndex ¶
func (groupStore *GroupStore) GetByIndex(key string, value string) []model.Group
type ProjectShare ¶
type ProjectShare struct {
// contains filtered or unexported fields
}
type RuleStore ¶
type RuleStore struct {
common.ResourceStore
}
RuleStore is a store for rules of security policy
type SecurityPolicy ¶
type SecurityPolicy model.SecurityPolicy
func (*SecurityPolicy) Key ¶
func (sp *SecurityPolicy) Key() string
func (*SecurityPolicy) Value ¶
func (sp *SecurityPolicy) Value() data.DataValue
type SecurityPolicyService ¶
func InitializeSecurityPolicy ¶
func InitializeSecurityPolicy(service common.Service) (*SecurityPolicyService, error)
InitializeSecurityPolicy sync NSX resources
func (*SecurityPolicyService) BuildPeerTags ¶
func (service *SecurityPolicyService) BuildPeerTags(obj *v1alpha1.SecurityPolicy, peers *[]v1alpha1.SecurityPolicyPeer, idx int, isSource, groupShared bool) []model.Tag
func (*SecurityPolicyService) Cleanup ¶
func (service *SecurityPolicyService) Cleanup() error
func (*SecurityPolicyService) CreateOrUpdateSecurityPolicy ¶
func (service *SecurityPolicyService) CreateOrUpdateSecurityPolicy(obj *v1alpha1.SecurityPolicy) error
func (*SecurityPolicyService) DeleteSecurityPolicy ¶
func (service *SecurityPolicyService) DeleteSecurityPolicy(obj interface{}, isVpcCleanup bool) error
func (*SecurityPolicyService) ListSecurityPolicyID ¶
func (service *SecurityPolicyService) ListSecurityPolicyID() sets.String
func (*SecurityPolicyService) ResolveNamespace ¶
func (service *SecurityPolicyService) ResolveNamespace(lbs *meta1.LabelSelector) (*v1.NamespaceList, error)
ResolveNamespace Get namespace name when the rule has namespace selector.
func (*SecurityPolicyService) WrapHierarchyProjectGroups ¶
func (*SecurityPolicyService) WrapHierarchyProjectShares ¶
func (*SecurityPolicyService) WrapHierarchySecurityPolicy ¶
func (service *SecurityPolicyService) WrapHierarchySecurityPolicy(sp *model.SecurityPolicy, gs []model.Group) (*model.Infra, error)
WrapHierarchySecurityPolicy wrap the security policy with groups and rules into a hierarchy security policy for InfraClient to patch.
func (*SecurityPolicyService) WrapHierarchyVpcSecurityPolicy ¶
func (service *SecurityPolicyService) WrapHierarchyVpcSecurityPolicy(sp *model.SecurityPolicy, gs []model.Group, vpcInfo *common.VPCResourceInfo, ) (*model.OrgRoot, error)
WrapHierarchyVpcSecurityPolicy wrap the security policy with groups and rules into a hierarchy SecurityPolicy for OrgRootClient to patch.
type SecurityPolicyStore ¶
type SecurityPolicyStore struct {
common.ResourceStore
}
SecurityPolicyStore is a store for security policy
func (*SecurityPolicyStore) Apply ¶ added in v0.0.1
func (securityPolicyStore *SecurityPolicyStore) Apply(i interface{}) error
func (*SecurityPolicyStore) GetByIndex ¶
func (securityPolicyStore *SecurityPolicyStore) GetByIndex(key string, value string) []model.SecurityPolicy
func (*SecurityPolicyStore) GetByKey ¶
func (securityPolicyStore *SecurityPolicyStore) GetByKey(key string) *model.SecurityPolicy
type ShareStore ¶
type ShareStore struct {
}ShareStore is a store for project shares referenced by security policy rule
func (*ShareStore) Apply ¶ added in v0.0.1
func (shareStore *ShareStore) Apply(i interface{}) error
func (*ShareStore) GetByIndex ¶
func (shareStore *ShareStore) GetByIndex(key string, value string) []model.Share
Click to show internal directories.
Click to hide internal directories.