Documentation ¶
Index ¶
- Constants
- Variables
- func Subtract(one, other map[string]interface{}) map[string]interface{}
- func VisitorCollectFunc(collect *[]*Resource) visitEachFunc
- type And
- type ById
- type ByProperty
- type ByType
- type ByTypeAndProperty
- type ByTypes
- type ChildrenVisitor
- type Diff
- type Differ
- type DistributionOrigin
- type FilterFn
- type FirewallRule
- type FirewallRules
- type Grant
- type Grantee
- type Grants
- type Graph
- func (g *Graph) Accept(v Visitor) error
- func (g *Graph) AddAppliesOnRelation(parent, child *Resource) error
- func (g *Graph) AddGraph(other *Graph)
- func (g *Graph) AddParentRelation(parent, child *Resource) error
- func (g *Graph) AddResource(resources ...*Resource) error
- func (g *Graph) AsRDFGraphSnaphot() tstore.RDFGraph
- func (g *Graph) Filter(entity string, filters ...FilterFn) (*Graph, error)
- func (g *Graph) FindAncestor(res *Resource, resourceType string) *Resource
- func (g *Graph) FindResource(id string) (*Resource, error)
- func (g *Graph) FindResourcesByProperty(key string, value interface{}) ([]*Resource, error)
- func (g *Graph) GetAllResources(typs ...string) ([]*Resource, error)
- func (g *Graph) GetResource(t string, id string) (*Resource, error)
- func (g *Graph) ListResourcesAppliedOn(start *Resource) ([]*Resource, error)
- func (g *Graph) ListResourcesDependingOn(start *Resource) ([]*Resource, error)
- func (g *Graph) MarshalTo(w io.Writer) error
- func (g *Graph) MustMarshal() string
- func (g *Graph) OrFilter(entity string, filters ...FilterFn) (*Graph, error)
- func (g *Graph) ResolveResources(resolvers ...Resolver) ([]*Resource, error)
- func (g *Graph) Unmarshal(data []byte) error
- func (g *Graph) UnmarshalFromReaders(readers ...io.Reader) error
- type KeyValue
- type Or
- type ParentsVisitor
- type Policy
- type PolicyStatement
- type PortRange
- type Resolver
- type Resource
- type Resources
- type Route
- type RouteTarget
- type Routes
- type SiblingsVisitor
- type StatementPrincipal
- type Visitor
Constants ¶
View Source
const ( EgressOnlyInternetGatewayTarget routeTargetType = iota GatewayTarget InstanceTarget NatTarget NetworkInterfaceTarget VpcPeeringConnectionTarget )
Variables ¶
View Source
var ( DefaultDiffer = &hierarchicDiffer{rdf.ParentOf} MetaPredicate = "meta" )
Functions ¶
func VisitorCollectFunc ¶
func VisitorCollectFunc(collect *[]*Resource) visitEachFunc
Types ¶
type ByProperty ¶
type ByProperty struct { Key string Value interface{} }
type ByTypeAndProperty ¶ added in v0.1.2
type ChildrenVisitor ¶
func (*ChildrenVisitor) Visit ¶
func (v *ChildrenVisitor) Visit(g *Graph) error
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
func (*Diff) MergedGraph ¶
type DistributionOrigin ¶ added in v0.0.25
type DistributionOrigin struct { ID string `predicate:"cloud:id"` PublicDNS string `predicate:"cloud:publicDNS"` PathPrefix string `predicate:"cloud:pathPrefix"` OriginType string `predicate:"cloud:type"` Config string `predicate:"cloud:config"` }
func (*DistributionOrigin) String ¶ added in v0.0.25
func (o *DistributionOrigin) String() string
type FilterFn ¶
func BuildPropertyFilterFunc ¶
func BuildTagFilterFunc ¶ added in v0.0.24
func BuildTagKeyFilterFunc ¶ added in v0.0.24
func BuildTagValueFilterFunc ¶ added in v0.0.24
type FirewallRule ¶
type FirewallRule struct { PortRange PortRange `predicate:"net:portRange"` Protocol string `predicate:"net:protocol"` IPRanges []*net.IPNet `predicate:"net:cidr"` // IPv4 or IPv6 range Sources []string `predicate:"cloud:source"` }
func (*FirewallRule) Contains ¶ added in v0.0.22
func (r *FirewallRule) Contains(ip string) bool
func (*FirewallRule) String ¶
func (r *FirewallRule) String() string
type FirewallRules ¶ added in v0.0.22
type FirewallRules []*FirewallRule
func (FirewallRules) Sort ¶ added in v0.0.22
func (rules FirewallRules) Sort()
type Grant ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
func NewGraphFromFile ¶
func (*Graph) AddAppliesOnRelation ¶
func (*Graph) AddParentRelation ¶
func (*Graph) AddResource ¶
func (*Graph) AsRDFGraphSnaphot ¶ added in v0.1.2
func (*Graph) FindAncestor ¶ added in v0.1.3
func (*Graph) FindResourcesByProperty ¶
func (*Graph) GetAllResources ¶
func (*Graph) ListResourcesAppliedOn ¶
func (*Graph) ListResourcesDependingOn ¶
func (*Graph) MustMarshal ¶
func (*Graph) ResolveResources ¶
type KeyValue ¶ added in v0.0.23
type ParentsVisitor ¶
func (*ParentsVisitor) Visit ¶
func (v *ParentsVisitor) Visit(g *Graph) error
type PolicyStatement ¶ added in v0.1.4
type PolicyStatement struct { ID string `json:"Sid,omitempty"` Principal *StatementPrincipal `json:",omitempty"` NotPrincipal *StatementPrincipal `json:",omitempty"` Effect string `json:",omitempty"` Actions compositeString `json:"Action,omitempty"` NotActions compositeString `json:"NotAction,omitempty"` Resources compositeString `json:"Resource,omitempty"` NotResources compositeString `json:"NotResource,omitempty"` Condition interface{} `json:",omitempty"` }
type PortRange ¶
func ParsePortRange ¶ added in v0.0.22
type Resource ¶
type Resource struct { Properties map[string]interface{} Relations map[string][]*Resource Meta map[string]interface{} // contains filtered or unexported fields }
func InitResource ¶
func NotFoundResource ¶ added in v0.0.22
func ResolveResourcesWithProp ¶ added in v0.1.2
type Route ¶
type RouteTarget ¶
func ParseRouteTarget ¶ added in v0.0.22
func ParseRouteTarget(s string) (*RouteTarget, error)
func (*RouteTarget) String ¶
func (t *RouteTarget) String() string
type SiblingsVisitor ¶
func (*SiblingsVisitor) Visit ¶
func (v *SiblingsVisitor) Visit(g *Graph) error
type StatementPrincipal ¶ added in v0.1.4
type StatementPrincipal struct { AWS compositeString `json:",omitempty"` Service compositeString `json:",omitempty"` Federated compositeString `json:",omitempty"` }
func (*StatementPrincipal) UnmarshalJSON ¶ added in v0.1.4
func (c *StatementPrincipal) UnmarshalJSON(data []byte) (err error)
To support AWS JSON for Policy in which a principal can be either a JSON object, either "*"
Source Files ¶
Click to show internal directories.
Click to hide internal directories.