model

package
v1.34.1 Latest Latest
Warning

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

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

Documentation

Overview

Package model provides functions to convert models to GraphQL models

Index

Constants

This section is empty.

Variables

View Source
var AllRole = []Role{
	RoleAdmin,
	RoleUser,
	RoleViewer,
}

Functions

func ClearCurrentAgentUpgradeError

func ClearCurrentAgentUpgradeError(cur *model.Agent)

ClearCurrentAgentUpgradeError clears the current agent upgrade error

Types

type AgentChange

type AgentChange struct {
	Agent      *model.Agent    `json:"agent"`
	ChangeType AgentChangeType `json:"changeType"`
}

func ToAgentChange

func ToAgentChange(change store.Event[*model.Agent]) *AgentChange

ToAgentChange converts a store.AgentChange to use for use with graphql

func ToAgentChangeArray

func ToAgentChangeArray(changes store.Events[*model.Agent]) []*AgentChange

ToAgentChangeArray converts store.AgentChanges to a []*AgentChange for use with graphql

type AgentChangeType

type AgentChangeType string
const (
	AgentChangeTypeInsert AgentChangeType = "INSERT"
	AgentChangeTypeUpdate AgentChangeType = "UPDATE"
	AgentChangeTypeRemove AgentChangeType = "REMOVE"
)

func (AgentChangeType) IsValid

func (e AgentChangeType) IsValid() bool

func (AgentChangeType) MarshalGQL

func (e AgentChangeType) MarshalGQL(w io.Writer)

func (AgentChangeType) String

func (e AgentChangeType) String() string

func (*AgentChangeType) UnmarshalGQL

func (e *AgentChangeType) UnmarshalGQL(v interface{}) error

type AgentConfiguration

type AgentConfiguration struct {
	Collector *string                `json:"Collector"`
	Logging   *string                `json:"Logging"`
	Manager   map[string]interface{} `json:"Manager"`
}

type Agents

type Agents struct {
	Query         *string              `json:"query"`
	Agents        []*model.Agent       `json:"agents"`
	Suggestions   []*search.Suggestion `json:"suggestions"`
	LatestVersion string               `json:"latestVersion"`
}

type ClearAgentUpgradeErrorInput

type ClearAgentUpgradeErrorInput struct {
	AgentID string `json:"agentId"`
}

type ConfigurationChange

type ConfigurationChange struct {
	Configuration *model.Configuration `json:"configuration"`
	EventType     EventType            `json:"eventType"`
}

func ToConfigurationChange

func ToConfigurationChange(event store.Event[*model.Configuration]) *ConfigurationChange

ToConfigurationChange converts a store.Event for Configuration to a ConfigurationChange for use with graphql

func ToConfigurationChanges

func ToConfigurationChanges(events store.Events[*model.Configuration]) []*ConfigurationChange

ToConfigurationChanges converts store.Events for Configuration to an array of ConfigurationChange for use with graphql

type Configurations

type Configurations struct {
	Query          *string                `json:"query"`
	Configurations []*model.Configuration `json:"configurations"`
	Suggestions    []*search.Suggestion   `json:"suggestions"`
}

type DestinationWithType

type DestinationWithType struct {
	Destination     *model.Destination     `json:"destination"`
	DestinationType *model.DestinationType `json:"destinationType"`
}

type EdgeMetric added in v1.25.0

type EdgeMetric struct {
	Name         string  `json:"name"`
	EdgeID       string  `json:"edgeID"`
	PipelineType string  `json:"pipelineType"`
	Value        float64 `json:"value"`
	Unit         string  `json:"unit"`
}

func ToEdgeMetric added in v1.25.0

func ToEdgeMetric(m *record.Metric, edgeID string) (*EdgeMetric, error)

ToEdgeMetric converts a Metric to an EdgeMetric

type EditConfigurationDescriptionInput

type EditConfigurationDescriptionInput struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type EventType

type EventType string
const (
	EventTypeInsert EventType = "INSERT"
	EventTypeUpdate EventType = "UPDATE"
	EventTypeRemove EventType = "REMOVE"
)

func ToEventType

func ToEventType(eventType store.EventType) EventType

ToEventType converts a store.EventType to a graphql EventType

func (EventType) IsValid

func (e EventType) IsValid() bool

func (EventType) MarshalGQL

func (e EventType) MarshalGQL(w io.Writer)

func (EventType) String

func (e EventType) String() string

func (*EventType) UnmarshalGQL

func (e *EventType) UnmarshalGQL(v interface{}) error

type GraphMetric

type GraphMetric struct {
	Name         string  `json:"name"`
	NodeID       string  `json:"nodeID"`
	PipelineType string  `json:"pipelineType"`
	Value        float64 `json:"value"`
	Unit         string  `json:"unit"`
	AgentID      *string `json:"agentID"`
}

func ToGraphMetric

func ToGraphMetric(m *record.Metric) (*GraphMetric, error)

ToGraphMetric converts a Metric to a GraphMetric

type GraphMetrics

type GraphMetrics struct {
	Metrics        []*GraphMetric `json:"metrics"`
	MaxMetricValue float64        `json:"maxMetricValue"`
	MaxLogValue    float64        `json:"maxLogValue"`
	MaxTraceValue  float64        `json:"maxTraceValue"`
	EdgeMetrics    []*EdgeMetric  `json:"edgeMetrics"`
}

type OverviewPage

type OverviewPage struct {
	Graph *graph.Graph `json:"graph"`
}

type ParameterType

type ParameterType string
const (
	ParameterTypeString                  ParameterType = "string"
	ParameterTypeStrings                 ParameterType = "strings"
	ParameterTypeInt                     ParameterType = "int"
	ParameterTypeBool                    ParameterType = "bool"
	ParameterTypeEnum                    ParameterType = "enum"
	ParameterTypeEnums                   ParameterType = "enums"
	ParameterTypeMap                     ParameterType = "map"
	ParameterTypeYaml                    ParameterType = "yaml"
	ParameterTypeTimezone                ParameterType = "timezone"
	ParameterTypeMetrics                 ParameterType = "metrics"
	ParameterTypeAwsCloudwatchNamedField ParameterType = "awsCloudwatchNamedField"
	ParameterTypeFileLogSort             ParameterType = "fileLogSort"
	ParameterTypeMapToEnum               ParameterType = "mapToEnum"
)

func (ParameterType) IsValid

func (e ParameterType) IsValid() bool

func (ParameterType) MarshalGQL

func (e ParameterType) MarshalGQL(w io.Writer)

func (ParameterType) String

func (e ParameterType) String() string

func (*ParameterType) UnmarshalGQL

func (e *ParameterType) UnmarshalGQL(v interface{}) error

type ProcessorWithType added in v1.22.0

type ProcessorWithType struct {
	Processor     *model.Processor     `json:"processor"`
	ProcessorType *model.ProcessorType `json:"processorType"`
}

type RelevantIfOperatorType

type RelevantIfOperatorType string
const (
	RelevantIfOperatorTypeEquals      RelevantIfOperatorType = "equals"
	RelevantIfOperatorTypeNotEquals   RelevantIfOperatorType = "notEquals"
	RelevantIfOperatorTypeContainsAny RelevantIfOperatorType = "containsAny"
)

func (RelevantIfOperatorType) IsValid

func (e RelevantIfOperatorType) IsValid() bool

func (RelevantIfOperatorType) MarshalGQL

func (e RelevantIfOperatorType) MarshalGQL(w io.Writer)

func (RelevantIfOperatorType) String

func (e RelevantIfOperatorType) String() string

func (*RelevantIfOperatorType) UnmarshalGQL

func (e *RelevantIfOperatorType) UnmarshalGQL(v interface{}) error

type RemoveAgentConfigurationInput

type RemoveAgentConfigurationInput struct {
	AgentID string `json:"agentId"`
}

type ResourceTypeKind

type ResourceTypeKind string
const (
	ResourceTypeKindSource      ResourceTypeKind = "SOURCE"
	ResourceTypeKindDestination ResourceTypeKind = "DESTINATION"
)

func (ResourceTypeKind) IsValid

func (e ResourceTypeKind) IsValid() bool

func (ResourceTypeKind) MarshalGQL

func (e ResourceTypeKind) MarshalGQL(w io.Writer)

func (ResourceTypeKind) String

func (e ResourceTypeKind) String() string

func (*ResourceTypeKind) UnmarshalGQL

func (e *ResourceTypeKind) UnmarshalGQL(v interface{}) error

type Role added in v1.19.0

type Role string
const (
	RoleAdmin  Role = "admin"
	RoleUser   Role = "user"
	RoleViewer Role = "viewer"
)

func (Role) IsValid added in v1.19.0

func (e Role) IsValid() bool

func (Role) MarshalGQL added in v1.19.0

func (e Role) MarshalGQL(w io.Writer)

func (Role) String added in v1.19.0

func (e Role) String() string

func (*Role) UnmarshalGQL added in v1.19.0

func (e *Role) UnmarshalGQL(v interface{}) error

type Snapshot

type Snapshot struct {
	Logs    []*record.Log    `json:"logs"`
	Metrics []*record.Metric `json:"metrics"`
	Traces  []*record.Trace  `json:"traces"`
}

type SourceWithType added in v1.22.0

type SourceWithType struct {
	Source     *model.Source     `json:"source"`
	SourceType *model.SourceType `json:"sourceType"`
}

type UpdateProcessorsInput

type UpdateProcessorsInput struct {
	Configuration string                         `json:"configuration"`
	ResourceType  ResourceTypeKind               `json:"resourceType"`
	ResourceIndex int                            `json:"resourceIndex"`
	Processors    []*model.ResourceConfiguration `json:"processors"`
}

Jump to

Keyboard shortcuts

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