gremlin

package
v0.0.0-...-8ed3357 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPackageFunctionNodesToGraph

func AddPackageFunctionNodesToGraph(serviceName string, serviceVersion string, components *serviceparser.ServiceComponents)

AddPackageFunctionNodesToGraph as advertised, adds a package node and its corresponding functions to the graph.

func CreateClusterVerisonNode

func CreateClusterVerisonNode(clusterVersion string)

CreateClusterVerisonNode creates the top level cluster version node CALL THIS JUST ONCE PER RUN OF THIS SCRIPT, THAT IS HOW THIS CODE IS DESIGNED.

func CreateCompileTimePaths

func CreateCompileTimePaths(edges []serviceparser.CompileEdge, serviceName string)

CreateCompileTimePaths creates compile time paths from the callgraph output.

func CreateDependencyNodes

func CreateDependencyNodes(serviceName, serviceVersion string, ic []serviceparser.ImportContainer)

func CreateFunctionNodes

func CreateFunctionNodes(serviceName string, packagename string, functionNames []string) string

CreateFunctionNodes adds function nodes to the graph and an edge between it and it's parent service and it's package DO NOT CALL NewPackageNodeQuery BEFORE YOU'VE ENTERED ALL THE NODES FOR A PACKAGE

func CreateNewServiceVersionNode

func CreateNewServiceVersionNode(clusterVersion, serviceName, version string)

CreateNewServiceVersionNode creates a new service node for a codebase. DO NOT CALL THIS FUNCTION WITHOUT A CLUSTER VERSION NODE IN CONTEXT

func GetCompileTimePathsAffectedByPR

func GetCompileTimePathsAffectedByPR(points *serviceparser.TouchPoints) []map[string]interface{}

func GetRunTimePathsAffectedByPR

func GetRunTimePathsAffectedByPR(points *serviceparser.TouchPoints) []map[string]interface{}

func NewPackageNodeQuery

func NewPackageNodeQuery(serviceName, serviceVersion, packagename string) string

NewPackageNodeQuery creates a new package node and joins it using an edge to the parent service node.

func ReadFile

func ReadFile(filepath string) string

ReadFile reads the contents of a text file and return it as a string

func RunGroovyScript

func RunGroovyScript(scriptPath string)

RunGroovyScript takes the path to a groovy script and runs it at the Gremlin console.

func RunQuery

func RunQuery(query string) map[string]interface{}

func RunQueryUnMarshaled

func RunQueryUnMarshaled(query string) string

RunQuery runs the specified gremling query and returns its result unmarshaled.

Types

type PRPayload

type PRPayload struct {
	PrID    int    `json:"pr_id"`
	RepoURL string `json:"repo_url"`
}

type PrConfidence

type PrConfidence struct {
	ConfidenceScore  float64                   `json:"confidence_score"`
	PrTitle          string                    `json:"pr_title"`
	TouchPoints      serviceparser.TouchPoints `json:"touch_points"`
	CompilePaths     []map[string]interface{}  `json:"compile_paths"`
	CompilePathCount int                       `json:"compile_path_count"`
	RunTimePaths     []map[string]interface{}  `json:"run_time_paths"`
	RuntimePathCount int                       `json:"runtime_path_count"`
}

func GetPRConfidenceScore

func GetPRConfidenceScore(points *serviceparser.TouchPoints) PrConfidence

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL