Documentation ¶
Overview ¶
Package msd contains a client library to talk to Athenz MSD.
Index ¶
- func MSDSchema() *rdl.Schema
- type ActionName
- type AuthorityName
- type CompoundName
- type DomainName
- type DynamicWorkload
- type EntityList
- type EntityName
- type IPBlock
- type MSDClient
- func (client *MSDClient) AddCredentials(header string, token string)
- func (client MSDClient) EvaluateNetworkPolicyChange(detail *NetworkPolicyChangeImpactRequest) (*NetworkPolicyChangeImpactResponse, error)
- func (client MSDClient) GetTransportPolicyRules(matchingTag string) (*TransportPolicyRules, string, error)
- func (client MSDClient) GetTransportPolicyValidationStatus(domainName DomainName) (*TransportPolicyValidationResponseList, error)
- func (client MSDClient) GetWorkloadsByIP(ip string, matchingTag string) (*Workloads, string, error)
- func (client MSDClient) GetWorkloadsByService(domainName DomainName, serviceName EntityName, matchingTag string) (*Workloads, string, error)
- func (client MSDClient) PutDynamicWorkload(domainName DomainName, serviceName EntityName, options *WorkloadOptions) error
- func (client MSDClient) PutStaticWorkload(domainName DomainName, serviceName EntityName, staticWorkload *StaticWorkload) error
- func (client MSDClient) ValidateTransportPolicy(transportPolicy *TransportPolicyValidationRequest) (*TransportPolicyValidationResponse, error)
- type NetworkPolicyChangeEffect
- type NetworkPolicyChangeImpactDetail
- type NetworkPolicyChangeImpactRequest
- type NetworkPolicyChangeImpactResponse
- type NetworkPolicyPort
- type PathElement
- type PolicyPort
- type ResourceName
- type ServiceName
- type SimpleName
- type StaticWorkload
- type StaticWorkloadType
- type TransportPolicyCondition
- type TransportPolicyEgressRule
- type TransportPolicyEnforcementState
- type TransportPolicyEntitySelector
- type TransportPolicyIngressRule
- type TransportPolicyMatch
- type TransportPolicyPeer
- type TransportPolicyPort
- type TransportPolicyProtocol
- type TransportPolicyRules
- type TransportPolicySubject
- type TransportPolicySubjectDomainName
- type TransportPolicySubjectServiceName
- type TransportPolicyTrafficDirection
- type TransportPolicyValidationRequest
- type TransportPolicyValidationResponse
- type TransportPolicyValidationResponseList
- type TransportPolicyValidationStatus
- type Workload
- type WorkloadOptions
- type Workloads
- type YBase64
- type YEncoded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorityName ¶
type AuthorityName string
AuthorityName - Used as the prefix in a signed assertion. This uniquely identifies a signing authority.
type CompoundName ¶
type CompoundName string
CompoundName - A compound name. Most names in this API are compound names.
type DomainName ¶
type DomainName string
DomainName - A domain name is the general qualifier prefix, as its uniqueness is managed.
type DynamicWorkload ¶ added in v1.10.32
type DynamicWorkload struct { // // name of the domain // DomainName DomainName `json:"domainName"` // // name of the service // ServiceName EntityName `json:"serviceName"` // // unique identifier for the workload, usually defined by provider // Uuid string `json:"uuid"` // // list of IP addresses associated with the workload, optional for // getWorkloadsByIP API call // IpAddresses []string `json:"ipAddresses"` // // hostname associated with the workload // Hostname string `json:"hostname"` // // infrastructure provider e.g. Kubernetes, AWS, Azure, openstack etc. // Provider string `json:"provider"` // // most recent update timestamp in the backend // UpdateTime rdl.Timestamp `json:"updateTime"` // // certificate expiry time (ex: getNotAfter) // CertExpiryTime rdl.Timestamp `json:"certExpiryTime"` // // certificate issue time (ex: getNotBefore) // CertIssueTime *rdl.Timestamp `json:"certIssueTime,omitempty" rdl:"optional" yaml:",omitempty"` }
DynamicWorkload - workload type describing workload bootstrapped with an identity
func NewDynamicWorkload ¶ added in v1.10.32
func NewDynamicWorkload(init ...*DynamicWorkload) *DynamicWorkload
NewDynamicWorkload - creates an initialized DynamicWorkload instance, returns a pointer to it
func (*DynamicWorkload) Init ¶ added in v1.10.32
func (self *DynamicWorkload) Init() *DynamicWorkload
Init - sets up the instance according to its default field values, if any
func (*DynamicWorkload) UnmarshalJSON ¶ added in v1.10.32
func (self *DynamicWorkload) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a DynamicWorkload
func (*DynamicWorkload) Validate ¶ added in v1.10.32
func (self *DynamicWorkload) Validate() error
Validate - checks for missing required fields, etc
type EntityList ¶
type EntityList string
EntityList - An Entity list is comma separated compound Names
type EntityName ¶
type EntityName string
EntityName - An entity name is a short form of a resource name, including only the domain and entity.
type IPBlock ¶ added in v1.10.39
type IPBlock struct { // // cidr notation. can be used for ipv4 or ipv6 // Cidr string `json:"cidr"` }
IPBlock - Struct representing ip blocks used by network policy in CIDR (Classless inter-domain routing) format
func NewIPBlock ¶ added in v1.10.39
NewIPBlock - creates an initialized IPBlock instance, returns a pointer to it
func (*IPBlock) UnmarshalJSON ¶ added in v1.10.39
UnmarshalJSON is defined for proper JSON decoding of a IPBlock
type MSDClient ¶
type MSDClient struct { URL string Transport http.RoundTripper CredsHeader *string CredsToken *string Timeout time.Duration }
func NewClient ¶
func NewClient(url string, transport http.RoundTripper) MSDClient
NewClient creates and returns a new HTTP client object for the MSD service
func (*MSDClient) AddCredentials ¶
AddCredentials adds the credentials to the client for subsequent requests.
func (MSDClient) EvaluateNetworkPolicyChange ¶ added in v1.10.39
func (client MSDClient) EvaluateNetworkPolicyChange(detail *NetworkPolicyChangeImpactRequest) (*NetworkPolicyChangeImpactResponse, error)
func (MSDClient) GetTransportPolicyRules ¶
func (client MSDClient) GetTransportPolicyRules(matchingTag string) (*TransportPolicyRules, string, error)
func (MSDClient) GetTransportPolicyValidationStatus ¶ added in v1.10.40
func (client MSDClient) GetTransportPolicyValidationStatus(domainName DomainName) (*TransportPolicyValidationResponseList, error)
func (MSDClient) GetWorkloadsByIP ¶ added in v1.10.20
func (MSDClient) GetWorkloadsByService ¶ added in v1.10.20
func (client MSDClient) GetWorkloadsByService(domainName DomainName, serviceName EntityName, matchingTag string) (*Workloads, string, error)
func (MSDClient) PutDynamicWorkload ¶ added in v1.10.32
func (client MSDClient) PutDynamicWorkload(domainName DomainName, serviceName EntityName, options *WorkloadOptions) error
func (MSDClient) PutStaticWorkload ¶ added in v1.10.32
func (client MSDClient) PutStaticWorkload(domainName DomainName, serviceName EntityName, staticWorkload *StaticWorkload) error
func (MSDClient) ValidateTransportPolicy ¶ added in v1.10.34
func (client MSDClient) ValidateTransportPolicy(transportPolicy *TransportPolicyValidationRequest) (*TransportPolicyValidationResponse, error)
type NetworkPolicyChangeEffect ¶ added in v1.10.39
type NetworkPolicyChangeEffect int
NetworkPolicyChangeEffect - IMPACT indicates that a change in network policy will interfere with workings of one or more transport policies NO_IMAPCT indicates that a change in network policy will not interfere with workings of any transport policy
const ( IMPACT NetworkPolicyChangeEffect NO_IMPACT )
NetworkPolicyChangeEffect constants
func NewNetworkPolicyChangeEffect ¶ added in v1.10.39
func NewNetworkPolicyChangeEffect(init ...interface{}) NetworkPolicyChangeEffect
NewNetworkPolicyChangeEffect - return a string representation of the enum
func (NetworkPolicyChangeEffect) MarshalJSON ¶ added in v1.10.39
func (e NetworkPolicyChangeEffect) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a NetworkPolicyChangeEffect
func (NetworkPolicyChangeEffect) String ¶ added in v1.10.39
func (e NetworkPolicyChangeEffect) String() string
String - return a string representation of the enum
func (NetworkPolicyChangeEffect) SymbolSet ¶ added in v1.10.39
func (e NetworkPolicyChangeEffect) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*NetworkPolicyChangeEffect) UnmarshalJSON ¶ added in v1.10.39
func (e *NetworkPolicyChangeEffect) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a NetworkPolicyChangeEffect
type NetworkPolicyChangeImpactDetail ¶ added in v1.10.39
type NetworkPolicyChangeImpactDetail struct { // // Name of the domain of the corresponding transport policy // Domain DomainName `json:"domain"` // // Name of the Athenz policy corresponding to transport policy // Policy EntityName `json:"policy"` // // Unique id of the transport policy // TransportPolicyId int64 `json:"transportPolicyId"` }
NetworkPolicyChangeImpactDetail -
func NewNetworkPolicyChangeImpactDetail ¶ added in v1.10.39
func NewNetworkPolicyChangeImpactDetail(init ...*NetworkPolicyChangeImpactDetail) *NetworkPolicyChangeImpactDetail
NewNetworkPolicyChangeImpactDetail - creates an initialized NetworkPolicyChangeImpactDetail instance, returns a pointer to it
func (*NetworkPolicyChangeImpactDetail) UnmarshalJSON ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactDetail) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a NetworkPolicyChangeImpactDetail
func (*NetworkPolicyChangeImpactDetail) Validate ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactDetail) Validate() error
Validate - checks for missing required fields, etc
type NetworkPolicyChangeImpactRequest ¶ added in v1.10.39
type NetworkPolicyChangeImpactRequest struct { // // from ip address range list in cidr format // From []*IPBlock `json:"from"` // // to ip address range list in cidr format // To []*IPBlock `json:"to"` // // list of source ports // SourcePorts []*NetworkPolicyPort `json:"sourcePorts"` // // list of destination ports // DestinationPorts []*NetworkPolicyPort `json:"destinationPorts"` }
NetworkPolicyChangeImpactRequest - struct representing input details for evaluating network policies change impact on transport policies
func NewNetworkPolicyChangeImpactRequest ¶ added in v1.10.39
func NewNetworkPolicyChangeImpactRequest(init ...*NetworkPolicyChangeImpactRequest) *NetworkPolicyChangeImpactRequest
NewNetworkPolicyChangeImpactRequest - creates an initialized NetworkPolicyChangeImpactRequest instance, returns a pointer to it
func (*NetworkPolicyChangeImpactRequest) Init ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactRequest) Init() *NetworkPolicyChangeImpactRequest
Init - sets up the instance according to its default field values, if any
func (*NetworkPolicyChangeImpactRequest) UnmarshalJSON ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a NetworkPolicyChangeImpactRequest
func (*NetworkPolicyChangeImpactRequest) Validate ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactRequest) Validate() error
Validate - checks for missing required fields, etc
type NetworkPolicyChangeImpactResponse ¶ added in v1.10.39
type NetworkPolicyChangeImpactResponse struct { // // enum indicating effect of network policy change on one or more transport // policies // Effect NetworkPolicyChangeEffect `json:"effect"` // // if the above enum value is IMPACT then this optional object contains more // details about the impacted transport policies // Details []*NetworkPolicyChangeImpactDetail `json:"details,omitempty" rdl:"optional" yaml:",omitempty"` }
NetworkPolicyChangeImpactResponse - struct representing response of evaluating network policies change impact on transport policies
func NewNetworkPolicyChangeImpactResponse ¶ added in v1.10.39
func NewNetworkPolicyChangeImpactResponse(init ...*NetworkPolicyChangeImpactResponse) *NetworkPolicyChangeImpactResponse
NewNetworkPolicyChangeImpactResponse - creates an initialized NetworkPolicyChangeImpactResponse instance, returns a pointer to it
func (*NetworkPolicyChangeImpactResponse) UnmarshalJSON ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a NetworkPolicyChangeImpactResponse
func (*NetworkPolicyChangeImpactResponse) Validate ¶ added in v1.10.39
func (self *NetworkPolicyChangeImpactResponse) Validate() error
Validate - checks for missing required fields, etc
type NetworkPolicyPort ¶ added in v1.10.39
type NetworkPolicyPort struct { // // Start port of the port range. port and endPort will have same values for a // single port definition. // Port int32 `json:"port"` // // End port of the port range. port and endPort will have same values for a // single port definition. // EndPort int32 `json:"endPort"` // // protocol used by the network policy // Protocol TransportPolicyProtocol `json:"protocol"` }
NetworkPolicyPort - network policy port.
func NewNetworkPolicyPort ¶ added in v1.10.39
func NewNetworkPolicyPort(init ...*NetworkPolicyPort) *NetworkPolicyPort
NewNetworkPolicyPort - creates an initialized NetworkPolicyPort instance, returns a pointer to it
func (*NetworkPolicyPort) UnmarshalJSON ¶ added in v1.10.39
func (self *NetworkPolicyPort) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a NetworkPolicyPort
func (*NetworkPolicyPort) Validate ¶ added in v1.10.39
func (self *NetworkPolicyPort) Validate() error
Validate - checks for missing required fields, etc
type PolicyPort ¶ added in v1.10.39
type PolicyPort struct { // // Start port of the port range. port and endPort will have same values for a // single port definition. // Port int32 `json:"port"` // // End port of the port range. port and endPort will have same values for a // single port definition. // EndPort int32 `json:"endPort"` }
PolicyPort - generic policy port. Will be used by TransportPolicyPort and NetworkPolicyPort structs
func NewPolicyPort ¶ added in v1.10.39
func NewPolicyPort(init ...*PolicyPort) *PolicyPort
NewPolicyPort - creates an initialized PolicyPort instance, returns a pointer to it
func (*PolicyPort) UnmarshalJSON ¶ added in v1.10.39
func (self *PolicyPort) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a PolicyPort
func (*PolicyPort) Validate ¶ added in v1.10.39
func (self *PolicyPort) Validate() error
Validate - checks for missing required fields, etc
type ResourceName ¶
type ResourceName string
ResourceName - A resource name Note that the EntityName part is optional, that is, a domain name followed by a colon is valid resource name.
type ServiceName ¶
type ServiceName string
ServiceName - A service name will generally be a unique subdomain.
type SimpleName ¶
type SimpleName string
SimpleName - Copyright The Athenz Authors Licensed under the terms of the Apache version 2.0 license. See LICENSE file for terms. Common name types used by several API definitions A simple identifier, an element of compound name.
type StaticWorkload ¶ added in v1.10.32
type StaticWorkload struct { // // name of the domain // DomainName DomainName `json:"domainName"` // // name of the service // ServiceName EntityName `json:"serviceName"` // // value representing one of the StaticWorkloadType enum // Type StaticWorkloadType `json:"type"` // // list of IP addresses associated with the workload, optional for // getWorkloadsByIP API call // IpAddresses []string `json:"ipAddresses,omitempty" rdl:"optional" yaml:",omitempty"` // // name associated with the workload. In most cases will be a FQDN // Name string `json:"name" rdl:"optional" yaml:",omitempty"` // // most recent update timestamp in the backend // UpdateTime *rdl.Timestamp `json:"updateTime,omitempty" rdl:"optional" yaml:",omitempty"` }
StaticWorkload - workload type describing workload indirectly associated with an identity ( without bootstrap )
func NewStaticWorkload ¶ added in v1.10.32
func NewStaticWorkload(init ...*StaticWorkload) *StaticWorkload
NewStaticWorkload - creates an initialized StaticWorkload instance, returns a pointer to it
func (*StaticWorkload) UnmarshalJSON ¶ added in v1.10.32
func (self *StaticWorkload) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a StaticWorkload
func (*StaticWorkload) Validate ¶ added in v1.10.32
func (self *StaticWorkload) Validate() error
Validate - checks for missing required fields, etc
type StaticWorkloadType ¶ added in v1.10.32
type StaticWorkloadType int
StaticWorkloadType - Enum representing defined types of static workloads.
const ( VIP StaticWorkloadType ENTERPRISE_APPLIANCE CLOUD_LB CLOUD_NAT EXTERNAL_APPLIANCE )
StaticWorkloadType constants
func NewStaticWorkloadType ¶ added in v1.10.32
func NewStaticWorkloadType(init ...interface{}) StaticWorkloadType
NewStaticWorkloadType - return a string representation of the enum
func (StaticWorkloadType) MarshalJSON ¶ added in v1.10.32
func (e StaticWorkloadType) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a StaticWorkloadType
func (StaticWorkloadType) String ¶ added in v1.10.32
func (e StaticWorkloadType) String() string
String - return a string representation of the enum
func (StaticWorkloadType) SymbolSet ¶ added in v1.10.32
func (e StaticWorkloadType) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*StaticWorkloadType) UnmarshalJSON ¶ added in v1.10.32
func (e *StaticWorkloadType) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a StaticWorkloadType
type TransportPolicyCondition ¶
type TransportPolicyCondition struct { // // State of transport policy enforcement ( ENFORCE / REPORT ) // EnforcementState TransportPolicyEnforcementState `json:"enforcementState"` // // Acts as restrictions. If present, this transport policy should be // restricted to only mentioned instances. // Instances []string `json:"instances,omitempty" rdl:"optional" yaml:",omitempty"` }
TransportPolicyCondition - Transport policy condition. Used to specify additional restrictions for the subject of a transport policy
func NewTransportPolicyCondition ¶
func NewTransportPolicyCondition(init ...*TransportPolicyCondition) *TransportPolicyCondition
NewTransportPolicyCondition - creates an initialized TransportPolicyCondition instance, returns a pointer to it
func (*TransportPolicyCondition) UnmarshalJSON ¶
func (self *TransportPolicyCondition) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyCondition
func (*TransportPolicyCondition) Validate ¶
func (self *TransportPolicyCondition) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyEgressRule ¶
type TransportPolicyEgressRule struct { // // Assertion id associated with this transport policy // Id int64 `json:"id"` // // Last modification timestamp of this transport policy // LastModified rdl.Timestamp `json:"lastModified"` // // Entity to which this transport policy applies // EntitySelector *TransportPolicyEntitySelector `json:"entitySelector"` // // Destination of network traffic // To *TransportPolicyPeer `json:"to"` }
TransportPolicyEgressRule - Transport policy egress rule
func NewTransportPolicyEgressRule ¶
func NewTransportPolicyEgressRule(init ...*TransportPolicyEgressRule) *TransportPolicyEgressRule
NewTransportPolicyEgressRule - creates an initialized TransportPolicyEgressRule instance, returns a pointer to it
func (*TransportPolicyEgressRule) Init ¶
func (self *TransportPolicyEgressRule) Init() *TransportPolicyEgressRule
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyEgressRule) UnmarshalJSON ¶
func (self *TransportPolicyEgressRule) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyEgressRule
func (*TransportPolicyEgressRule) Validate ¶
func (self *TransportPolicyEgressRule) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyEnforcementState ¶
type TransportPolicyEnforcementState int
TransportPolicyEnforcementState - Types of transport policy enforcement states
const ( ENFORCE TransportPolicyEnforcementState REPORT )
TransportPolicyEnforcementState constants
func NewTransportPolicyEnforcementState ¶
func NewTransportPolicyEnforcementState(init ...interface{}) TransportPolicyEnforcementState
NewTransportPolicyEnforcementState - return a string representation of the enum
func (TransportPolicyEnforcementState) MarshalJSON ¶
func (e TransportPolicyEnforcementState) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a TransportPolicyEnforcementState
func (TransportPolicyEnforcementState) String ¶
func (e TransportPolicyEnforcementState) String() string
String - return a string representation of the enum
func (TransportPolicyEnforcementState) SymbolSet ¶
func (e TransportPolicyEnforcementState) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*TransportPolicyEnforcementState) UnmarshalJSON ¶
func (e *TransportPolicyEnforcementState) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyEnforcementState
type TransportPolicyEntitySelector ¶
type TransportPolicyEntitySelector struct { // // Requirements for selecting the subject for this transport policy. // Match *TransportPolicyMatch `json:"match"` // // List of network traffic port of the subject eligible for the transport // policy // Ports []*TransportPolicyPort `json:"ports"` }
TransportPolicyEntitySelector - Entity to which a transport policy applies. Describes the subject and port(s) for a transport policy.
func NewTransportPolicyEntitySelector ¶
func NewTransportPolicyEntitySelector(init ...*TransportPolicyEntitySelector) *TransportPolicyEntitySelector
NewTransportPolicyEntitySelector - creates an initialized TransportPolicyEntitySelector instance, returns a pointer to it
func (*TransportPolicyEntitySelector) Init ¶
func (self *TransportPolicyEntitySelector) Init() *TransportPolicyEntitySelector
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyEntitySelector) UnmarshalJSON ¶
func (self *TransportPolicyEntitySelector) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyEntitySelector
func (*TransportPolicyEntitySelector) Validate ¶
func (self *TransportPolicyEntitySelector) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyIngressRule ¶
type TransportPolicyIngressRule struct { // // Assertion id associated with this transport policy // Id int64 `json:"id"` // // Last modification timestamp of this transport policy // LastModified rdl.Timestamp `json:"lastModified"` // // Describes the entity to which this transport policy applies // EntitySelector *TransportPolicyEntitySelector `json:"entitySelector"` // // Source of network traffic // From *TransportPolicyPeer `json:"from"` }
TransportPolicyIngressRule - Transport policy ingress rule
func NewTransportPolicyIngressRule ¶
func NewTransportPolicyIngressRule(init ...*TransportPolicyIngressRule) *TransportPolicyIngressRule
NewTransportPolicyIngressRule - creates an initialized TransportPolicyIngressRule instance, returns a pointer to it
func (*TransportPolicyIngressRule) Init ¶
func (self *TransportPolicyIngressRule) Init() *TransportPolicyIngressRule
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyIngressRule) UnmarshalJSON ¶
func (self *TransportPolicyIngressRule) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyIngressRule
func (*TransportPolicyIngressRule) Validate ¶
func (self *TransportPolicyIngressRule) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyMatch ¶
type TransportPolicyMatch struct { // // Subject where this transport policy applies // AthenzService *TransportPolicySubject `json:"athenzService"` // // List of additional requirements for restrictions. Requirements are ANDed. // Conditions []*TransportPolicyCondition `json:"conditions"` }
TransportPolicyMatch - Selector for the subject of a transport policy
func NewTransportPolicyMatch ¶
func NewTransportPolicyMatch(init ...*TransportPolicyMatch) *TransportPolicyMatch
NewTransportPolicyMatch - creates an initialized TransportPolicyMatch instance, returns a pointer to it
func (*TransportPolicyMatch) Init ¶
func (self *TransportPolicyMatch) Init() *TransportPolicyMatch
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyMatch) UnmarshalJSON ¶
func (self *TransportPolicyMatch) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyMatch
func (*TransportPolicyMatch) Validate ¶
func (self *TransportPolicyMatch) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyPeer ¶
type TransportPolicyPeer struct { // // List of transport policy subjects // AthenzServices []*TransportPolicySubject `json:"athenzServices"` // // List of network traffic port part of this transport policy // Ports []*TransportPolicyPort `json:"ports"` }
TransportPolicyPeer - Source or destination for a transport policy
func NewTransportPolicyPeer ¶
func NewTransportPolicyPeer(init ...*TransportPolicyPeer) *TransportPolicyPeer
NewTransportPolicyPeer - creates an initialized TransportPolicyPeer instance, returns a pointer to it
func (*TransportPolicyPeer) Init ¶
func (self *TransportPolicyPeer) Init() *TransportPolicyPeer
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyPeer) UnmarshalJSON ¶
func (self *TransportPolicyPeer) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyPeer
func (*TransportPolicyPeer) Validate ¶
func (self *TransportPolicyPeer) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyPort ¶
type TransportPolicyPort struct { // // Start port of the port range. port and endPort will have same values for a // single port definition. // Port int32 `json:"port"` // // End port of the port range. port and endPort will have same values for a // single port definition. // EndPort int32 `json:"endPort"` // // Protocol for this transport policy // Protocol TransportPolicyProtocol `json:"protocol"` }
TransportPolicyPort - Transport policy port
func NewTransportPolicyPort ¶
func NewTransportPolicyPort(init ...*TransportPolicyPort) *TransportPolicyPort
NewTransportPolicyPort - creates an initialized TransportPolicyPort instance, returns a pointer to it
func (*TransportPolicyPort) UnmarshalJSON ¶
func (self *TransportPolicyPort) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyPort
func (*TransportPolicyPort) Validate ¶
func (self *TransportPolicyPort) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyProtocol ¶
type TransportPolicyProtocol int
TransportPolicyProtocol - Types of transport policy protocols
const ( TCP TransportPolicyProtocol UDP )
TransportPolicyProtocol constants
func NewTransportPolicyProtocol ¶
func NewTransportPolicyProtocol(init ...interface{}) TransportPolicyProtocol
NewTransportPolicyProtocol - return a string representation of the enum
func (TransportPolicyProtocol) MarshalJSON ¶
func (e TransportPolicyProtocol) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a TransportPolicyProtocol
func (TransportPolicyProtocol) String ¶
func (e TransportPolicyProtocol) String() string
String - return a string representation of the enum
func (TransportPolicyProtocol) SymbolSet ¶
func (e TransportPolicyProtocol) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*TransportPolicyProtocol) UnmarshalJSON ¶
func (e *TransportPolicyProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyProtocol
type TransportPolicyRules ¶
type TransportPolicyRules struct { // // List of ingress rules // Ingress []*TransportPolicyIngressRule `json:"ingress"` // // List of egress rules // Egress []*TransportPolicyEgressRule `json:"egress"` }
TransportPolicyRules - Transport policy containing ingress and egress rules
func NewTransportPolicyRules ¶
func NewTransportPolicyRules(init ...*TransportPolicyRules) *TransportPolicyRules
NewTransportPolicyRules - creates an initialized TransportPolicyRules instance, returns a pointer to it
func (*TransportPolicyRules) Init ¶
func (self *TransportPolicyRules) Init() *TransportPolicyRules
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyRules) UnmarshalJSON ¶
func (self *TransportPolicyRules) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyRules
func (*TransportPolicyRules) Validate ¶
func (self *TransportPolicyRules) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicySubject ¶
type TransportPolicySubject struct { // // Name of the domain // DomainName TransportPolicySubjectDomainName `json:"domainName"` // // Name of the service // ServiceName TransportPolicySubjectServiceName `json:"serviceName"` }
TransportPolicySubject - Subject for a transport policy
func NewTransportPolicySubject ¶
func NewTransportPolicySubject(init ...*TransportPolicySubject) *TransportPolicySubject
NewTransportPolicySubject - creates an initialized TransportPolicySubject instance, returns a pointer to it
func (*TransportPolicySubject) UnmarshalJSON ¶
func (self *TransportPolicySubject) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicySubject
func (*TransportPolicySubject) Validate ¶
func (self *TransportPolicySubject) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicySubjectDomainName ¶ added in v1.10.40
type TransportPolicySubjectDomainName string
TransportPolicySubjectDomainName - DomainName in TransportPolicySubject should allow * to indicate ANY
type TransportPolicySubjectServiceName ¶ added in v1.10.40
type TransportPolicySubjectServiceName string
TransportPolicySubjectServiceName - ServiceName in TransportPolicySubject should allow * to indicate ANY
type TransportPolicyTrafficDirection ¶ added in v1.10.34
type TransportPolicyTrafficDirection int
TransportPolicyTrafficDirection - Types of transport policy traffic direction
const ( INGRESS TransportPolicyTrafficDirection EGRESS )
TransportPolicyTrafficDirection constants
func NewTransportPolicyTrafficDirection ¶ added in v1.10.34
func NewTransportPolicyTrafficDirection(init ...interface{}) TransportPolicyTrafficDirection
NewTransportPolicyTrafficDirection - return a string representation of the enum
func (TransportPolicyTrafficDirection) MarshalJSON ¶ added in v1.10.34
func (e TransportPolicyTrafficDirection) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a TransportPolicyTrafficDirection
func (TransportPolicyTrafficDirection) String ¶ added in v1.10.34
func (e TransportPolicyTrafficDirection) String() string
String - return a string representation of the enum
func (TransportPolicyTrafficDirection) SymbolSet ¶ added in v1.10.34
func (e TransportPolicyTrafficDirection) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*TransportPolicyTrafficDirection) UnmarshalJSON ¶ added in v1.10.34
func (e *TransportPolicyTrafficDirection) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyTrafficDirection
type TransportPolicyValidationRequest ¶ added in v1.10.34
type TransportPolicyValidationRequest struct { // // Describes the entity to which this transport policy applies // EntitySelector *TransportPolicyEntitySelector `json:"entitySelector"` // // source or destination of the network traffic depending on direction // Peer *TransportPolicyPeer `json:"peer"` // // If present, assertion id associated with this transport policy // Id *int64 `json:"id,omitempty" rdl:"optional" yaml:",omitempty"` TrafficDirection TransportPolicyTrafficDirection `json:"trafficDirection"` }
TransportPolicyValidationRequest - Transport policy request object to be validated
func NewTransportPolicyValidationRequest ¶ added in v1.10.34
func NewTransportPolicyValidationRequest(init ...*TransportPolicyValidationRequest) *TransportPolicyValidationRequest
NewTransportPolicyValidationRequest - creates an initialized TransportPolicyValidationRequest instance, returns a pointer to it
func (*TransportPolicyValidationRequest) Init ¶ added in v1.10.34
func (self *TransportPolicyValidationRequest) Init() *TransportPolicyValidationRequest
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyValidationRequest) UnmarshalJSON ¶ added in v1.10.34
func (self *TransportPolicyValidationRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyValidationRequest
func (*TransportPolicyValidationRequest) Validate ¶ added in v1.10.34
func (self *TransportPolicyValidationRequest) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyValidationResponse ¶ added in v1.10.34
type TransportPolicyValidationResponse struct { Status TransportPolicyValidationStatus `json:"status"` Errors []string `json:"errors,omitempty" rdl:"optional" yaml:",omitempty"` // // most recent update timestamp in the backend // UpdateTime *rdl.Timestamp `json:"updateTime,omitempty" rdl:"optional" yaml:",omitempty"` // // If present, assertion id associated with the transport policy // Id *int64 `json:"id,omitempty" rdl:"optional" yaml:",omitempty"` }
TransportPolicyValidationResponse - Response object of transport policy rule validation
func NewTransportPolicyValidationResponse ¶ added in v1.10.34
func NewTransportPolicyValidationResponse(init ...*TransportPolicyValidationResponse) *TransportPolicyValidationResponse
NewTransportPolicyValidationResponse - creates an initialized TransportPolicyValidationResponse instance, returns a pointer to it
func (*TransportPolicyValidationResponse) UnmarshalJSON ¶ added in v1.10.34
func (self *TransportPolicyValidationResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyValidationResponse
func (*TransportPolicyValidationResponse) Validate ¶ added in v1.10.34
func (self *TransportPolicyValidationResponse) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyValidationResponseList ¶ added in v1.10.40
type TransportPolicyValidationResponseList struct { // // list of transport policy validation response // ResponseList []*TransportPolicyValidationResponse `json:"responseList"` }
TransportPolicyValidationResponseList - List of TransportPolicyValidationResponse
func NewTransportPolicyValidationResponseList ¶ added in v1.10.40
func NewTransportPolicyValidationResponseList(init ...*TransportPolicyValidationResponseList) *TransportPolicyValidationResponseList
NewTransportPolicyValidationResponseList - creates an initialized TransportPolicyValidationResponseList instance, returns a pointer to it
func (*TransportPolicyValidationResponseList) Init ¶ added in v1.10.40
func (self *TransportPolicyValidationResponseList) Init() *TransportPolicyValidationResponseList
Init - sets up the instance according to its default field values, if any
func (*TransportPolicyValidationResponseList) UnmarshalJSON ¶ added in v1.10.40
func (self *TransportPolicyValidationResponseList) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyValidationResponseList
func (*TransportPolicyValidationResponseList) Validate ¶ added in v1.10.40
func (self *TransportPolicyValidationResponseList) Validate() error
Validate - checks for missing required fields, etc
type TransportPolicyValidationStatus ¶ added in v1.10.34
type TransportPolicyValidationStatus int
TransportPolicyValidationStatus - Validation Status of transport policy vs network policy
const ( VALID TransportPolicyValidationStatus INVALID PARTIAL )
TransportPolicyValidationStatus constants
func NewTransportPolicyValidationStatus ¶ added in v1.10.34
func NewTransportPolicyValidationStatus(init ...interface{}) TransportPolicyValidationStatus
NewTransportPolicyValidationStatus - return a string representation of the enum
func (TransportPolicyValidationStatus) MarshalJSON ¶ added in v1.10.34
func (e TransportPolicyValidationStatus) MarshalJSON() ([]byte, error)
MarshalJSON is defined for proper JSON encoding of a TransportPolicyValidationStatus
func (TransportPolicyValidationStatus) String ¶ added in v1.10.34
func (e TransportPolicyValidationStatus) String() string
String - return a string representation of the enum
func (TransportPolicyValidationStatus) SymbolSet ¶ added in v1.10.34
func (e TransportPolicyValidationStatus) SymbolSet() []string
SymbolSet - return an array of all valid string representations (symbols) of the enum
func (*TransportPolicyValidationStatus) UnmarshalJSON ¶ added in v1.10.34
func (e *TransportPolicyValidationStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a TransportPolicyValidationStatus
type Workload ¶ added in v1.10.20
type Workload struct { // // name of the domain // DomainName DomainName `json:"domainName"` // // name of the service // ServiceName EntityName `json:"serviceName"` // // unique identifier for the workload, usually defined by provider // Uuid string `json:"uuid"` // // list of IP addresses associated with the workload, optional for // getWorkloadsByIP API call // IpAddresses []string `json:"ipAddresses"` // // hostname associated with the workload // Hostname string `json:"hostname"` // // infrastructure provider e.g. Kubernetes, AWS, Azure, openstack etc. // Provider string `json:"provider"` // // most recent update timestamp in the backend // UpdateTime rdl.Timestamp `json:"updateTime"` // // certificate expiry time (ex: getNotAfter) // CertExpiryTime rdl.Timestamp `json:"certExpiryTime"` // // certificate issue time (ex: getNotBefore) // CertIssueTime *rdl.Timestamp `json:"certIssueTime,omitempty" rdl:"optional" yaml:",omitempty"` }
Workload - kept for backward compatibility sake. Will be eventually deprecated in favor of DynamicWorkload
func NewWorkload ¶ added in v1.10.20
NewWorkload - creates an initialized Workload instance, returns a pointer to it
func (*Workload) Init ¶ added in v1.10.20
Init - sets up the instance according to its default field values, if any
func (*Workload) UnmarshalJSON ¶ added in v1.10.20
UnmarshalJSON is defined for proper JSON decoding of a Workload
type WorkloadOptions ¶ added in v1.10.26
type WorkloadOptions struct { // // boolean flag to signal a change in IP state // IpChanged bool `json:"ipChanged"` }
WorkloadOptions -
func NewWorkloadOptions ¶ added in v1.10.26
func NewWorkloadOptions(init ...*WorkloadOptions) *WorkloadOptions
NewWorkloadOptions - creates an initialized WorkloadOptions instance, returns a pointer to it
func (*WorkloadOptions) UnmarshalJSON ¶ added in v1.10.26
func (self *WorkloadOptions) UnmarshalJSON(b []byte) error
UnmarshalJSON is defined for proper JSON decoding of a WorkloadOptions
func (*WorkloadOptions) Validate ¶ added in v1.10.26
func (self *WorkloadOptions) Validate() error
Validate - checks for missing required fields, etc
type Workloads ¶ added in v1.10.20
type Workloads struct { // // list of workloads // WorkloadList []*Workload `json:"workloadList"` // // list of dynamic workloads // DynamicWorkloadList []*DynamicWorkload `json:"dynamicWorkloadList,omitempty" rdl:"optional" yaml:",omitempty"` // // list of static workloads // StaticWorkloadList []*StaticWorkload `json:"staticWorkloadList,omitempty" rdl:"optional" yaml:",omitempty"` }
Workloads - list of workloads
func NewWorkloads ¶ added in v1.10.20
NewWorkloads - creates an initialized Workloads instance, returns a pointer to it
func (*Workloads) Init ¶ added in v1.10.20
Init - sets up the instance according to its default field values, if any
func (*Workloads) UnmarshalJSON ¶ added in v1.10.20
UnmarshalJSON is defined for proper JSON decoding of a Workloads