nerdgraph

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityGuid

type EntityGuid string

type EntityOutline

type EntityOutline struct {
	Guid          string
	Name          string
	AccountId     int
	Domain        string
	Type          string
	AlertSeverity string
	Permalink     string
	Reporting     bool
	Tags          []Tag
}

type EntityQuery

type EntityQuery struct {
	Type      []string
	Domain    []string
	Name      string
	AccountId int
	Tags      []Tag
	Query     string
}

type NerdgraphClient

type NerdgraphClient struct {
	ApiURL string
	ApiKey string
	Logger *log.Logger
}

func NewNerdgraphClient

func NewNerdgraphClient(
	apiUrl string,
	apiKey string,
	log *log.Logger,
) *NerdgraphClient

func (*NerdgraphClient) AddTags

func (n *NerdgraphClient) AddTags(
	entity *EntityOutline,
	tags []Tag,
) error

func (*NerdgraphClient) DeleteTags

func (n *NerdgraphClient) DeleteTags(
	entity *EntityOutline,
	tagNames []string,
) error

func (*NerdgraphClient) GetEntities

func (c *NerdgraphClient) GetEntities(entityQuery *EntityQuery) ([]EntityOutline, error)

func (*NerdgraphClient) Mutate

func (c *NerdgraphClient) Mutate(
	context context.Context,
	gql interface{},
	variables map[string]interface{},
) error

func (*NerdgraphClient) Query

func (c *NerdgraphClient) Query(
	context context.Context,
	gql interface{},
	variables map[string]interface{},
) error

type Tag

type Tag struct {
	Key    string
	Values []string
}

type TaggingTagInput

type TaggingTagInput struct {
	Key    string
	Values []string
}

Jump to

Keyboard shortcuts

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