Documentation ¶
Overview ¶
Package model provides functions to convert models to GraphQL models
Index ¶
- Variables
- func ClearCurrentAgentUpgradeError(cur *model.Agent)
- type AgentChange
- type AgentChangeType
- type AgentConfiguration
- type Agents
- type ClearAgentUpgradeErrorInput
- type ConfigurationChange
- type Configurations
- type DestinationWithType
- type EditConfigurationDescriptionInput
- type EventType
- type GraphMetric
- type GraphMetrics
- type OverviewPage
- type ParameterType
- type ProcessorWithType
- type RelevantIfOperatorType
- type RemoveAgentConfigurationInput
- type ResourceTypeKind
- type Role
- type Snapshot
- type SourceWithType
- type UpdateProcessorsInput
Constants ¶
This section is empty.
Variables ¶
View Source
var AllAgentChangeType = []AgentChangeType{ AgentChangeTypeInsert, AgentChangeTypeUpdate, AgentChangeTypeRemove, }
View Source
var AllEventType = []EventType{ EventTypeInsert, EventTypeUpdate, EventTypeRemove, }
View Source
var AllParameterType = []ParameterType{ ParameterTypeString, ParameterTypeStrings, ParameterTypeInt, ParameterTypeBool, ParameterTypeEnum, ParameterTypeEnums, ParameterTypeMap, ParameterTypeYaml, ParameterTypeTimezone, ParameterTypeMetrics, ParameterTypeAwsCloudwatchNamedField, ParameterTypeFileLogSort, }
View Source
var AllRelevantIfOperatorType = []RelevantIfOperatorType{ RelevantIfOperatorTypeEquals, RelevantIfOperatorTypeNotEquals, RelevantIfOperatorTypeContainsAny, }
View Source
var AllResourceTypeKind = []ResourceTypeKind{ ResourceTypeKindSource, ResourceTypeKindDestination, }
View Source
var AllRole = []Role{ RoleAdmin, RoleUser, RoleViewer, }
Functions ¶
func ClearCurrentAgentUpgradeError ¶
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 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 EventType ¶
type EventType string
func ToEventType ¶
ToEventType converts a store.EventType to a graphql EventType
func (EventType) MarshalGQL ¶
func (*EventType) UnmarshalGQL ¶
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"` }
type OverviewPage ¶
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" )
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
func (Role) MarshalGQL ¶ added in v1.19.0
func (*Role) UnmarshalGQL ¶ added in v1.19.0
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"` }
Click to show internal directories.
Click to hide internal directories.