Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ActionAllow action for the policy ActionAllow string = "allow" // ActionDeny action for the policy ActionDeny string = "deny" )
View Source
const ( StrStack string = "stack" StrService string = "service" StrLinked string = "linked" )
StrStack for 'stack' string StrService for 'service' string StrLink for 'link' string
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NetworkPolicy ¶
type NetworkPolicy struct { DefaultAction string Rules []NetworkPolicyRule }
NetworkPolicy ...
func NewNetworkPolicy ¶
func NewNetworkPolicy(network *metadata.Network) (*NetworkPolicy, error)
NewNetworkPolicy takes in the metadata type and converts to local type
func ParseNetworkPolicyStr ¶
func ParseNetworkPolicyStr(npStr string) (*NetworkPolicy, error)
ParseNetworkPolicyStr is used to parse the input yaml representation of the network policy and perform basic validations
func (*NetworkPolicy) Validate ¶
func (np *NetworkPolicy) Validate() error
Validate runs basic validations on the network policy
type NetworkPolicyRule ¶
type NetworkPolicyRule struct {
metadata.NetworkPolicyRule
}
NetworkPolicyRule ...
func (*NetworkPolicyRule) Validate ¶
func (rule *NetworkPolicyRule) Validate() error
Validate runs basic validations on the policy
Click to show internal directories.
Click to hide internal directories.