models

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidStringSliceOrCSV = errors.New("expected array of strings, or a csv string")

Functions

This section is empty.

Types

type APIKeyRoleDescriptor added in v0.14.3

type APIKeyRoleDescriptor struct {
	Name          string             `json:"-"`
	Applications  []Application      `json:"applications,omitempty"`
	Global        map[string]any     `json:"global,omitempty"`
	Cluster       []string           `json:"cluster,omitempty"`
	Indices       []IndexPerms       `json:"indices,omitempty"`
	RemoteIndices []RemoteIndexPerms `json:"remote_indices,omitempty"`
	Metadata      map[string]any     `json:"metadata,omitempty"`
	RunAs         []string           `json:"run_as,omitempty"`
	Restriction   *Restriction       `json:"restriction,omitempty"`
}

type Action

type Action map[string]any

type ActionAlertsFilter added in v0.11.7

type ActionAlertsFilter struct {
	Kql       *string
	Timeframe *AlertsFilterTimeframe
}

type ActionFrequency added in v0.11.7

type ActionFrequency struct {
	Summary    bool
	NotifyWhen string
	Throttle   *string
}

type Agent added in v0.14.4

type Agent struct {
	ID            string             `json:"id"`
	Name          string             `json:"name"`
	Description   *string            `json:"description,omitempty"`
	AvatarColor   *string            `json:"avatar_color,omitempty"`
	AvatarSymbol  *string            `json:"avatar_symbol,omitempty"`
	Labels        []string           `json:"labels,omitempty"`
	Configuration AgentConfiguration `json:"configuration"`
}

type AgentAccessControl

type AgentAccessControl struct {
	AccessMode string `json:"access_mode"`
}

type AgentAccessControlResponse

type AgentAccessControlResponse struct {
	AccessControl AgentAccessControl `json:"access_control"`
}

AgentAccessControlResponse is the body of GET /agents/{id}/access_control.

type AgentConfiguration added in v0.14.4

type AgentConfiguration struct {
	Instructions *string            `json:"instructions,omitempty"`
	Tools        []AgentToolsConfig `json:"tools,omitempty"`
	SkillIDs     []string           `json:"skill_ids,omitempty"`
}

type AgentToolsConfig added in v0.14.4

type AgentToolsConfig struct {
	ToolIDs []string `json:"tool_ids"`
}

type AlertingRule added in v0.6.0

type AlertingRule struct {
	RuleID     string
	SpaceID    string
	Name       string
	Consumer   string
	NotifyWhen *string
	Params     map[string]any
	RuleTypeID string
	Schedule   AlertingRuleSchedule
	Actions    []AlertingRuleAction
	Enabled    *bool
	Tags       []string
	Throttle   *string

	ScheduledTaskID *string
	ExecutionStatus AlertingRuleExecutionStatus
	AlertDelay      *float32
	Flapping        *AlertingRuleFlapping
	Artifacts       *AlertingRuleArtifacts
}

type AlertingRuleAction added in v0.6.0

type AlertingRuleAction struct {
	Group        string
	ID           string
	Params       map[string]any
	Frequency    *ActionFrequency
	AlertsFilter *ActionAlertsFilter
}

type AlertingRuleArtifactDashboard added in v0.16.5

type AlertingRuleArtifactDashboard struct {
	ID string
}

AlertingRuleArtifactDashboard references a Kibana dashboard linked to the rule. Maps to the API's artifacts.dashboards[].id.

type AlertingRuleArtifacts added in v0.16.4

type AlertingRuleArtifacts struct {
	InvestigationGuide *AlertingRuleInvestigationGuide
	Dashboards         []AlertingRuleArtifactDashboard
}

AlertingRuleArtifacts holds the rule's linked assets: an investigation guide and/or references to related dashboards.

type AlertingRuleExecutionStatus added in v0.6.0

type AlertingRuleExecutionStatus struct {
	LastExecutionDate *time.Time
	Status            *string
}

type AlertingRuleFlapping added in v0.14.4

type AlertingRuleFlapping struct {
	LookBackWindow        int64
	StatusChangeThreshold int64
	Enabled               *bool
}

AlertingRuleFlapping is rule-level flapping detection settings (Kibana 8.16+).

type AlertingRuleInvestigationGuide added in v0.16.4

type AlertingRuleInvestigationGuide struct {
	Blob string
}

AlertingRuleInvestigationGuide is the investigation guide content attached to a rule. Maps to the API's artifacts.investigation_guide.blob.

type AlertingRuleSchedule added in v0.6.0

type AlertingRuleSchedule struct {
	Interval string
}

type AlertsFilterTimeframe added in v0.11.7

type AlertsFilterTimeframe struct {
	Days       []int32
	Timezone   string
	HoursStart string
	HoursEnd   string
}

type Application

type Application struct {
	Name       string   `json:"application"`
	Privileges []string `json:"privileges,omitempty"`
	Resources  []string `json:"resources"`
}

type ComponentTemplate added in v0.3.0

type ComponentTemplate struct {
	Name     string         `json:"-"`
	Meta     map[string]any `json:"_meta,omitempty"`
	Template *Template      `json:"template,omitempty"`
	Version  *int64         `json:"version,omitempty"`
}

type ComponentTemplateResponse added in v0.3.0

type ComponentTemplateResponse struct {
	Name              string            `json:"name"`
	ComponentTemplate ComponentTemplate `json:"component_template"`
}

type CrossClusterAPIKeyAccess added in v0.14.3

type CrossClusterAPIKeyAccess struct {
	Search      []CrossClusterAPIKeyAccessEntry `json:"search,omitempty"`
	Replication []CrossClusterAPIKeyAccessEntry `json:"replication,omitempty"`
}

type CrossClusterAPIKeyAccessEntry added in v0.14.3

type CrossClusterAPIKeyAccessEntry struct {
	Names                  []string       `json:"names"`
	FieldSecurity          *FieldSecurity `json:"field_security,omitempty"`
	Query                  *string        `json:"query,omitempty"`
	AllowRestrictedIndices *bool          `json:"allow_restricted_indices,omitempty"`
}

type DataStreamLifecycle added in v0.11.11

type DataStreamLifecycle struct {
	Name      string            `json:"name"`
	Lifecycle LifecycleSettings `json:"lifecycle"`
}

type DataStreamLifecycleResponse added in v0.15.0

type DataStreamLifecycleResponse struct {
	DataStreams []DataStreamLifecycle `json:"data_streams"`
}

type DataStreamOptions added in v0.15.0

type DataStreamOptions struct {
	FailureStore *FailureStoreOptions `json:"failure_store,omitempty"`
}

type DataStreamSettings added in v0.3.1

type DataStreamSettings struct {
	Hidden             *bool `json:"hidden,omitempty"`
	AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"`
}

type Downsampling added in v0.11.11

type Downsampling struct {
	After         string `json:"after,omitempty"`
	FixedInterval string `json:"fixed_interval,omitempty"`
}

type EnrichPolicy added in v0.6.0

type EnrichPolicy struct {
	Type         string   `json:"policy_type"`
	Name         string   `json:"name"`
	Indices      []string `json:"indices"`
	MatchField   string   `json:"match_field"`
	EnrichFields []string `json:"enrich_fields"`
	Query        string   `json:"query,omitempty"`
}

type FailureStoreLifecycle added in v0.15.0

type FailureStoreLifecycle struct {
	DataRetention string `json:"data_retention,omitempty"`
}

type FailureStoreOptions added in v0.15.0

type FailureStoreOptions struct {
	Enabled   *bool                  `json:"enabled,omitempty"`
	Lifecycle *FailureStoreLifecycle `json:"lifecycle,omitempty"`
}

type FieldSecurity

type FieldSecurity struct {
	Grant  []string `json:"grant,omitempty"`
	Except []string `json:"except,omitempty"`
}

type GetTransformResponse added in v0.6.0

type GetTransformResponse struct {
	Count      json.Number `json:"count"`
	Transforms []Transform `json:"transforms"`
}

type Index added in v0.2.0

type Index struct {
	Name     string                `json:"-"`
	Aliases  map[string]IndexAlias `json:"aliases,omitempty"`
	Mappings map[string]any        `json:"mappings,omitempty"`
	Settings map[string]any        `json:"settings,omitempty"`
}

type IndexAlias added in v0.2.0

type IndexAlias struct {
	Name          string         `json:"-"`
	Filter        map[string]any `json:"filter,omitempty"`
	IndexRouting  string         `json:"index_routing,omitempty"`
	IsHidden      bool           `json:"is_hidden,omitempty"`
	IsWriteIndex  bool           `json:"is_write_index,omitempty"`
	Routing       string         `json:"routing,omitempty"`
	SearchRouting string         `json:"search_routing,omitempty"`
}

type IndexPerms

type IndexPerms struct {
	FieldSecurity          *FieldSecurity `json:"field_security,omitempty"`
	Names                  []string       `json:"names"`
	Privileges             []string       `json:"privileges"`
	Query                  *string        `json:"query,omitempty"`
	AllowRestrictedIndices *bool          `json:"allow_restricted_indices,omitempty"`
}

type IndexTemplate

type IndexTemplate struct {
	Name                            string              `json:"-"`
	Create                          bool                `json:"-"`
	Timeout                         string              `json:"-"`
	ComposedOf                      []string            `json:"composed_of"`
	IgnoreMissingComponentTemplates []string            `json:"ignore_missing_component_templates,omitempty"`
	DataStream                      *DataStreamSettings `json:"data_stream,omitempty"`
	IndexPatterns                   []string            `json:"index_patterns"`
	Meta                            map[string]any      `json:"_meta,omitempty"`
	Priority                        *int64              `json:"priority,omitempty"`
	Template                        *Template           `json:"template,omitempty"`
	Version                         *int64              `json:"version,omitempty"`
	AllowAutoCreate                 *bool               `json:"allow_auto_create,omitempty"`
}

type IndexTemplateResponse

type IndexTemplateResponse struct {
	Name          string        `json:"name"`
	IndexTemplate IndexTemplate `json:"index_template"`
}

type IndexTemplatesResponse

type IndexTemplatesResponse struct {
	IndexTemplates []IndexTemplateResponse `json:"index_templates"`
}

IndexTemplatesResponse mirrors the GET /_index_template/<name> body so the read path can decode index template settings as raw map[string]any rather than through the typed go-elasticsearch structs, which silently drop fields they do not model (e.g. index.search.slowlog.include) and coerce string-encoded values such as index.lifecycle.parse_origination_date. See issue #3124.

type IngestPipeline added in v0.3.0

type IngestPipeline struct {
	Name        string           `json:"-"`
	Description *string          `json:"description,omitempty"`
	OnFailure   []map[string]any `json:"on_failure,omitempty"`
	Processors  []map[string]any `json:"processors"`
	Metadata    map[string]any   `json:"_meta,omitempty"`
}

type KibanaActionConnector added in v0.6.0

type KibanaActionConnector struct {
	ConnectorID      string
	SpaceID          string
	Name             string
	ConnectorTypeID  string
	ConfigJSON       string
	SecretsJSON      string
	IsDeprecated     bool
	IsMissingSecrets bool
	IsPreconfigured  bool
}

type LifecycleSettings added in v0.11.7

type LifecycleSettings struct {
	DataRetention string         `json:"data_retention,omitempty"`
	Enabled       bool           `json:"enabled,omitempty"`
	Downsampling  []Downsampling `json:"downsampling,omitempty"`
}

type LogstashPipeline added in v0.5.0

type LogstashPipeline struct {
	PipelineID       string         `json:"-"`
	Description      string         `json:"description,omitempty"`
	LastModified     string         `json:"last_modified"`
	Pipeline         string         `json:"pipeline"`
	PipelineMetadata map[string]any `json:"pipeline_metadata"`
	PipelineSettings map[string]any `json:"pipeline_settings"`
	Username         string         `json:"username"`
}

type Phase

type Phase struct {
	MinAge  string            `json:"min_age,omitempty"`
	Actions map[string]Action `json:"actions"`
}

type Policy

type Policy struct {
	Name     string           `json:"-"`
	Metadata map[string]any   `json:"_meta,omitempty"`
	Phases   map[string]Phase `json:"phases"`
}

type PutIndexParams added in v0.6.0

type PutIndexParams struct {
	WaitForActiveShards string
	MasterTimeout       time.Duration
	Timeout             time.Duration
}

type PutWatch added in v0.6.0

type PutWatch struct {
	WatchID string
	Active  bool
	Body    WatchBody
}

type RemoteIndexPerms added in v0.11.7

type RemoteIndexPerms struct {
	IndexPerms
	Clusters []string `json:"clusters"`
}

type Restriction added in v0.11.5

type Restriction struct {
	Workflows []string `json:"workflows,omitempty"`
}

type Skill added in v0.16.0

type Skill struct {
	ID                string                   `json:"id"`
	Name              string                   `json:"name"`
	Description       string                   `json:"description"`
	Content           string                   `json:"content"`
	ToolIDs           []string                 `json:"tool_ids,omitempty"`
	ReferencedContent []SkillReferencedContent `json:"referenced_content,omitempty"`
}

type SkillReferencedContent added in v0.16.0

type SkillReferencedContent struct {
	Name         string `json:"name"`
	RelativePath string `json:"relativePath"`
	Content      string `json:"content"`
}

type Slo added in v0.7.0

type Slo struct {
	SloID           string
	Name            string
	Description     string
	Indicator       kbapi.SLOsSloWithSummaryResponse_Indicator
	TimeWindow      kbapi.SLOsTimeWindow
	BudgetingMethod kbapi.SLOsBudgetingMethod
	Objective       kbapi.SLOsObjective
	Settings        *kbapi.SLOsSettings
	SpaceID         string
	GroupBy         []string
	Tags            []string
	Enabled         bool
	Artifacts       *kbapi.SLOsArtifacts
}

type StringSliceOrCSV added in v0.11.3

type StringSliceOrCSV []string

func (*StringSliceOrCSV) UnmarshalJSON added in v0.11.3

func (i *StringSliceOrCSV) UnmarshalJSON(data []byte) error

type Template

type Template struct {
	Aliases           map[string]IndexAlias `json:"aliases,omitempty"`
	Mappings          map[string]any        `json:"mappings,omitempty"`
	Settings          map[string]any        `json:"settings,omitempty"`
	Lifecycle         *LifecycleSettings    `json:"lifecycle,omitempty"`
	DataStreamOptions *DataStreamOptions    `json:"data_stream_options,omitempty"`
}

type Tool added in v0.14.4

type Tool struct {
	ID            string         `json:"id"`
	Type          string         `json:"type"`
	Description   *string        `json:"description,omitempty"`
	Tags          []string       `json:"tags,omitempty"`
	ReadOnly      bool           `json:"readonly"`
	Configuration map[string]any `json:"configuration"`
}

type Transform added in v0.6.0

type Transform struct {
	ID              string                    `json:"id,omitempty"`
	Name            string                    `json:"-"`
	Description     string                    `json:"description,omitempty"`
	Source          *TransformSource          `json:"source"`
	Destination     *TransformDestination     `json:"dest"`
	Pivot           any                       `json:"pivot,omitempty"`
	Latest          any                       `json:"latest,omitempty"`
	Frequency       string                    `json:"frequency,omitempty"`
	RetentionPolicy *TransformRetentionPolicy `json:"retention_policy,omitempty"`
	Sync            *TransformSync            `json:"sync,omitempty"`
	Meta            any                       `json:"_meta,omitempty"`
	Settings        *TransformSettings        `json:"settings,omitempty"`
}

type TransformAlias added in v0.11.9

type TransformAlias struct {
	Alias          string `json:"alias"`
	MoveOnCreation bool   `json:"move_on_creation,omitempty"`
}

type TransformDestination added in v0.6.0

type TransformDestination struct {
	Index    string           `json:"index"`
	Aliases  []TransformAlias `json:"aliases,omitempty"`
	Pipeline string           `json:"pipeline,omitempty"`
}

type TransformRetentionPolicy added in v0.6.0

type TransformRetentionPolicy struct {
	Time TransformRetentionPolicyTime `json:"time"`
}

type TransformRetentionPolicyTime added in v0.6.0

type TransformRetentionPolicyTime struct {
	Field  string `json:"field"`
	MaxAge string `json:"max_age"`
}

type TransformSettings added in v0.6.0

type TransformSettings struct {
	AlignCheckpoints   *bool    `json:"align_checkpoints,omitempty"`
	DatesAsEpochMillis *bool    `json:"dates_as_epoch_millis,omitempty"`
	DeduceMappings     *bool    `json:"deduce_mappings,omitempty"`
	DocsPerSecond      *float64 `json:"docs_per_second,omitempty"`
	MaxPageSearchSize  *int     `json:"max_page_search_size,omitempty"`
	NumFailureRetries  *int     `json:"num_failure_retries,omitempty"`
	Unattended         *bool    `json:"unattended,omitempty"`
}

type TransformSource added in v0.6.0

type TransformSource struct {
	Indices         []string `json:"index"`
	Query           any      `json:"query,omitempty"`
	RuntimeMappings any      `json:"runtime_mappings,omitempty"`
}

type TransformSync added in v0.6.0

type TransformSync struct {
	Time TransformSyncTime `json:"time"`
}

type TransformSyncTime added in v0.6.0

type TransformSyncTime struct {
	Field string `json:"field"`
	Delay string `json:"delay,omitempty"`
}

type Watch added in v0.6.0

type Watch struct {
	WatchID string `json:"-"`
	Status  struct {
		State struct {
			Active bool `json:"active"`
		} `json:"state"`
	} `json:"status"`
	Body WatchBody `json:"watch"`
}

type WatchBody added in v0.6.0

type WatchBody struct {
	Trigger                map[string]any `json:"trigger"`
	Input                  map[string]any `json:"input"`
	Condition              map[string]any `json:"condition"`
	Actions                map[string]any `json:"actions"`
	Metadata               map[string]any `json:"metadata"`
	Transform              map[string]any `json:"transform,omitempty"`
	ThrottlePeriodInMillis int            `json:"throttle_period_in_millis,omitempty"`
}

type Workflow added in v0.14.4

type Workflow struct {
	ID          string  `json:"id"`
	Yaml        string  `json:"yaml"`
	Name        string  `json:"name"`
	Description *string `json:"description,omitempty"`
	Enabled     bool    `json:"enabled"`
	Valid       bool    `json:"valid"`
}

Jump to

Keyboard shortcuts

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