Documentation
¶
Index ¶
- Constants
- Variables
- func NewGraphFromFiles(files ...string) (cloud.GraphAPI, error)
- 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) FilterGraph(q cloud.Query) (cloud.GraphAPI, error)
- func (g *Graph) Find(q cloud.Query) ([]cloud.Resource, error)
- func (g *Graph) FindAncestor(res *Resource, resourceType string) *Resource
- func (g *Graph) FindOne(q cloud.Query) (cloud.Resource, error)
- func (g *Graph) FindResource(id string) (*Resource, error)
- func (g *Graph) FindResourcesByProperty(key string, value interface{}) ([]*Resource, error)
- func (g *Graph) FindWithProperties(props map[string]interface{}) ([]cloud.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) Merge(mg cloud.GraphAPI) 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) ResourceRelations(from cloud.Resource, relation string, recursive bool) (collect []cloud.Resource, err error)
- func (g *Graph) ResourceSiblings(res cloud.Resource) (collect []cloud.Resource, err error)
- func (g *Graph) Unmarshal(data []byte) error
- func (g *Graph) UnmarshalFromReaders(readers ...io.Reader) error
- func (g *Graph) VisitRelations(from cloud.Resource, relation string, includeFrom bool, ...) (err error)
- type KeyValue
- type Or
- type ParentsVisitor
- type Policy
- type PolicyStatement
- type PortRange
- type Resolver
- type Resource
- func (res *Resource) AddRelation(typ string, rel *Resource)
- func (res *Resource) Format(layout string) (out string)
- func (res *Resource) Id() string
- func (res *Resource) Meta(k string) (interface{}, bool)
- func (res *Resource) Properties() map[string]interface{}
- func (res *Resource) Property(k string) (interface{}, bool)
- func (res *Resource) Same(other cloud.Resource) bool
- func (res *Resource) SetProperty(k string, v interface{})
- func (res *Resource) String() string
- func (res *Resource) Type() string
- 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 ¶
Functions ¶
func NewGraphFromFiles ¶ added in v0.1.11
func Subtract ¶ added in v0.0.23
Types ¶
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
}
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 ¶
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 Grantee ¶ added in v0.0.22
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
func (*Graph) AddAppliesOnRelation ¶
func (*Graph) AsRDFGraphSnaphot ¶ added in v0.1.2
func (*Graph) FilterGraph ¶ added in v0.1.9
func (*Graph) FindAncestor ¶ added in v0.1.3
func (*Graph) FindOne ¶ added in v0.1.9
func (*Graph) FindResourcesByProperty ¶
func (*Graph) FindWithProperties ¶ added in v0.1.9
func (*Graph) GetAllResources ¶
func (*Graph) ListResourcesAppliedOn ¶
func (*Graph) ListResourcesDependingOn ¶
func (*Graph) OrFilter ¶ added in v0.0.24
func (*Graph) ResolveResources ¶
func (*Graph) ResourceRelations ¶ added in v0.1.9
func (*Graph) ResourceSiblings ¶ added in v0.1.9
func (*Graph) UnmarshalFromReaders ¶ added in v0.1.4
type KeyValue ¶ added in v0.0.23
type ParentsVisitor ¶
func (*ParentsVisitor) Visit ¶
func (v *ParentsVisitor) Visit(g *Graph) error
type Policy ¶ added in v0.1.4
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 ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func ResolveResourcesWithProp ¶ added in v0.1.2
func (*Resource) AddRelation ¶ added in v0.1.9
func (*Resource) Property ¶ added in v0.1.9
func (*Resource) Same ¶
Compare only the id and type of the resources (no properties nor meta)
func (*Resource) SetProperty ¶ added in v0.1.9
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
¶
- diff.go
- filter.go
- graph.go
- rdf.go
- resolver.go
- resource.go
- type.go
- visit.go
Click to show internal directories.
Click to hide internal directories.