Documentation ¶
Overview ¶
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #
Index ¶
- Variables
- func DaysLeft(s string) string
- func GetLastPart(s string) string
- func GetPartFromEnd(s string, idx int) string
- func GetRegion(s string) string
- func Join(s []interface{}) string
- func JoinNicely(s []interface{}) string
- func NotLast(x int, a interface{}) bool
- func Replace(from string, to string, input string) string
- func ToLower(s string) string
- type GcpViz
- func (v *GcpViz) AddAsset(tx *bolt.Tx, asset validator.Asset, resource interface{}, addResourceData bool) error
- func (v *GcpViz) Create(dbFile string) error
- func (v *GcpViz) EnrichAssets() error
- func (v *GcpViz) EscapeLabel(label string) string
- func (v *GcpViz) ExportNodes(wg *sync.WaitGroup, ctx context.Context, out io.Writer) error
- func (v *GcpViz) GenerateNodes(wg *sync.WaitGroup, ctx context.Context, gizmoQuery string, ...) error
- func (v *GcpViz) Load(dbFile string) error
- func (v *GcpViz) ReadAssetsFromFile(input string, addResourceData bool) error
- func (v *GcpViz) Save() error
- func (v *GcpViz) UpdateAsset(tx *bolt.Tx, name string, resource interface{}) error
- type GraphStyle
- type IpAddressLink
- type NodeStyle
- type RawResourceRelations
- type ResourceRelations
- type TemplateResource
- type TemplateResourceResource
Constants ¶
This section is empty.
Variables ¶
View Source
var Edges map[string]map[string]*template.Template
View Source
var HeadLabels map[string]*template.Template
View Source
var Labels map[string]*template.Template
View Source
var Links map[string]*template.Template
View Source
var Nodes map[string]*template.Template
View Source
var TailLabels map[string]*template.Template
Functions ¶
func GetLastPart ¶
func GetPartFromEnd ¶
func JoinNicely ¶
func JoinNicely(s []interface{}) string
Types ¶
type GcpViz ¶
type GcpViz struct { QS graph.QuadStore QW graph.QuadWriter Relations ResourceRelations AssetDatabase *bolt.DB Assets *bolt.Bucket Aliases *bolt.Bucket Graph *bolt.Bucket OrgRoots []string TotalVertexes int64 TotalEdges int64 TotalAliases int64 TotalIps int64 // contains filtered or unexported fields }
func (*GcpViz) EnrichAssets ¶
func (*GcpViz) EscapeLabel ¶
func (*GcpViz) ExportNodes ¶
func (*GcpViz) GenerateNodes ¶
func (*GcpViz) ReadAssetsFromFile ¶
type GraphStyle ¶
type GraphStyle struct { Global map[string]string `yaml:"global" json:"global"` Options map[string]string `yaml:"options" json:"options"` Edges map[string]map[string]string `yaml:"edges" json:"edges"` Nodes map[string]string `yaml:"nodes" json:"nodes"` }
var Style GraphStyle
type NodeStyle ¶
type NodeStyle struct { Label string `json:"label"` HeadLabel string `json:"headLabel"` TailLabel string `json:"tailLabel"` Link string `json:"link"` Resource *TemplateResourceResource }
type RawResourceRelations ¶
type ResourceRelations ¶
type ResourceRelations struct { AssetTypes map[string][]jsonpath.FilterFunc Aliases map[string][]jsonpath.FilterFunc Enrich map[string]map[string]map[string]jsonpath.FilterFunc IpAddresses map[string][]jsonpath.FilterFunc }
type TemplateResource ¶
type TemplateResource struct { Name string `json:"name"` AssetType string `json:"asset_type"` Resource TemplateResourceResource `json:"resource"` Ancestors []string `json:"ancestors"` }
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
gcpviz
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
|
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. |
Click to show internal directories.
Click to hide internal directories.