models

package
v0.11.11 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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 Action

type Action map[string]interface{}

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 AlertingRule added in v0.6.0

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

	ScheduledTaskID *string
	ExecutionStatus AlertingRuleExecutionStatus
	AlertDelay      *float32
}

type AlertingRuleAction added in v0.6.0

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

type AlertingRuleExecutionStatus added in v0.6.0

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

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 ApiKey added in v0.5.0

type ApiKey struct {
	ID               string                          `json:"-"`
	Name             string                          `json:"name,omitempty"`
	RolesDescriptors map[string]ApiKeyRoleDescriptor `json:"role_descriptors,omitempty"`
	Expiration       string                          `json:"expiration,omitempty"`
	Metadata         map[string]interface{}          `json:"metadata,omitempty"`
}

type ApiKeyCreateResponse added in v0.11.10

type ApiKeyCreateResponse struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name"`
	Key        string `json:"api_key,omitempty"`
	EncodedKey string `json:"encoded,omitempty"`
}

type ApiKeyResponse added in v0.5.0

type ApiKeyResponse struct {
	ApiKey
	RolesDescriptors map[string]ApiKeyRoleDescriptor `json:"role_descriptors,omitempty"`
	Expiration       int64                           `json:"expiration,omitempty"`
	Id               string                          `json:"id,omitempty"`
	Key              string                          `json:"api_key,omitempty"`
	EncodedKey       string                          `json:"encoded,omitempty"`
	Invalidated      bool                            `json:"invalidated,omitempty"`
}

type ApiKeyRoleDescriptor added in v0.11.5

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

type Application

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

type BuildDate added in v0.11.3

type BuildDate struct {
	time.Time
}

func (*BuildDate) UnmarshalJSON added in v0.11.3

func (b *BuildDate) UnmarshalJSON(dateBytes []byte) error

type ClusterInfo added in v0.6.0

type ClusterInfo struct {
	Name        string `json:"name"`
	ClusterName string `json:"cluster_name"`
	ClusterUUID string `json:"cluster_uuid"`
	Version     struct {
		Number                           string    `json:"number"`
		BuildType                        string    `json:"build_type"`
		BuildHash                        string    `json:"build_hash"`
		BuildFlavor                      string    `json:"build_flavor"`
		BuildDate                        BuildDate `json:"build_date"`
		BuildSnapshot                    bool      `json:"build_snapshot"`
		LuceneVersion                    string    `json:"lucene_version"`
		MinimumWireCompatibilityVersion  string    `json:"minimum_wire_compatibility_version"`
		MinimumIndexCompatibilityVersion string    `json:"minimum_index_compatibility_version"`
	} `json:"version"`
	Tagline string `json:"tagline"`
}

type CommonProcessor added in v0.3.0

type CommonProcessor struct {
	Description   string                   `json:"description,omitempty"`
	If            string                   `json:"if,omitempty"`
	IgnoreFailure bool                     `json:"ignore_failure"`
	OnFailure     []map[string]interface{} `json:"on_failure,omitempty"`
	Tag           string                   `json:"tag,omitempty"`
}

type ComponentTemplate added in v0.3.0

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

type ComponentTemplateResponse added in v0.3.0

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

type ComponentTemplatesResponse added in v0.3.0

type ComponentTemplatesResponse struct {
	ComponentTemplates []ComponentTemplateResponse `json:"component_templates"`
}

type DataStream added in v0.3.0

type DataStream struct {
	Name           string                 `json:"name"`
	TimestampField TimestampField         `json:"timestamp_field"`
	Indices        []DataStreamIndex      `json:"indices"`
	Generation     uint64                 `json:"generation"`
	Meta           map[string]interface{} `json:"_meta"`
	Status         string                 `json:"status"`
	Template       string                 `json:"template"`
	IlmPolicy      string                 `json:"ilm_policy"`
	Hidden         bool                   `json:"hidden"`
	System         bool                   `json:"system"`
	Replicated     bool                   `json:"replicated"`
}

type DataStreamIndex added in v0.3.0

type DataStreamIndex struct {
	IndexName string `json:"index_name"`
	IndexUUID string `json:"index_uuid"`
}

type DataStreamLifecycle added in v0.11.11

type DataStreamLifecycle struct {
	Name      string            `json:"name"`
	Lifecycle LifecycleSettings `json:"lifecycle,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 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 GetTransformStatsResponse added in v0.6.0

type GetTransformStatsResponse struct {
	Count          json.Number      `json:"count"`
	TransformStats []TransformStats `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]interface{} `json:"mappings,omitempty"`
	Settings map[string]interface{} `json:"settings,omitempty"`
}

type IndexAlias added in v0.2.0

type IndexAlias struct {
	Name          string                 `json:"-"`
	Filter        map[string]interface{} `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"`
	DataStream    *DataStreamSettings    `json:"data_stream,omitempty"`
	IndexPatterns []string               `json:"index_patterns"`
	Meta          map[string]interface{} `json:"_meta,omitempty"`
	Priority      *int                   `json:"priority,omitempty"`
	Template      *Template              `json:"template,omitempty"`
	Version       *int                   `json:"version,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"`
}

type IngestPipeline added in v0.3.0

type IngestPipeline struct {
	Name        string                   `json:"-"`
	Description *string                  `json:"description,omitempty"`
	OnFailure   []map[string]interface{} `json:"on_failure,omitempty"`
	Processors  []map[string]interface{} `json:"processors"`
	Metadata    map[string]interface{}   `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]interface{} `json:"pipeline_metadata"`
	PipelineSettings map[string]interface{} `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]interface{} `json:"_meta,omitempty"`
	Phases   map[string]Phase       `json:"phases"`
}

type PolicyDefinition

type PolicyDefinition struct {
	Policy   Policy `json:"policy"`
	Modified string `json:"modified_date"`
}

type ProcessorAppend added in v0.3.0

type ProcessorAppend struct {
	CommonProcessor

	Field           string   `json:"field"`
	Value           []string `json:"value"`
	AllowDuplicates bool     `json:"allow_duplicates"`
	MediaType       string   `json:"media_type,omitempty"`
}

type ProcessorBytes added in v0.3.0

type ProcessorBytes struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorCSV added in v0.3.0

type ProcessorCSV struct {
	CommonProcessor

	Field         string   `json:"field"`
	TargetFields  []string `json:"target_fields"`
	IgnoreMissing bool     `json:"ignore_missing"`
	Separator     string   `json:"separator"`
	Quote         string   `json:"quote"`
	Trim          bool     `json:"trim"`
	EmptyValue    string   `json:"empty_value,omitempty"`
}

type ProcessorCircle added in v0.3.0

type ProcessorCircle struct {
	CommonProcessor
	ProcessortFields

	ErrorDistance float64 `json:"error_distance"`
	ShapeType     string  `json:"shape_type"`
}

type ProcessorCommunityId added in v0.3.0

type ProcessorCommunityId struct {
	CommonProcessor

	SourceIp        string `json:"source_ip,omitempty"`
	SourcePort      *int   `json:"source_port,omitempty"`
	DestinationIp   string `json:"destination_ip,omitempty"`
	DestinationPort *int   `json:"destination_port,omitempty"`
	IanaNumber      string `json:"iana_number,omitempty"`
	IcmpType        *int   `json:"icmp_type,omitempty"`
	IcmpCode        *int   `json:"icmp_code,omitempty"`
	Transport       string `json:"transport,omitempty"`
	TargetField     string `json:"target_field,omitempty"`
	Seed            *int   `json:"seed"`
	IgnoreMissing   bool   `json:"ignore_missing"`
}

type ProcessorConvert added in v0.3.0

type ProcessorConvert struct {
	CommonProcessor
	ProcessortFields

	Type string `json:"type"`
}

type ProcessorDate added in v0.3.0

type ProcessorDate struct {
	CommonProcessor

	Field        string   `json:"field"`
	TargetField  string   `json:"target_field,omitempty"`
	Formats      []string `json:"formats"`
	Timezone     string   `json:"timezone,omitempty"`
	Locale       string   `json:"locale,omitempty"`
	OutputFormat string   `json:"output_format,omitempty"`
}

type ProcessorDateIndexName added in v0.3.0

type ProcessorDateIndexName struct {
	CommonProcessor

	Field           string   `json:"field"`
	IndexNamePrefix string   `json:"index_name_prefix,omitempty"`
	DateRounding    string   `json:"date_rounding"`
	DateFormats     []string `json:"date_formats,omitempty"`
	Timezone        string   `json:"timezone,omitempty"`
	Locale          string   `json:"locale,omitempty"`
	IndexNameFormat string   `json:"index_name_format,omitempty"`
}

type ProcessorDissect added in v0.3.0

type ProcessorDissect struct {
	CommonProcessor

	Field           string `json:"field"`
	Pattern         string `json:"pattern"`
	AppendSeparator string `json:"append_separator"`
	IgnoreMissing   bool   `json:"ignore_missing"`
}

type ProcessorDotExpander added in v0.3.0

type ProcessorDotExpander struct {
	CommonProcessor

	Field    string `json:"field"`
	Path     string `json:"path,omitempty"`
	Override bool   `json:"override"`
}

type ProcessorDrop added in v0.3.0

type ProcessorDrop struct {
	CommonProcessor
}

type ProcessorEnrich added in v0.3.0

type ProcessorEnrich struct {
	CommonProcessor
	ProcessortFields

	PolicyName    string `json:"policy_name"`
	Override      bool   `json:"override"`
	MaxMatches    int    `json:"max_matches"`
	ShapeRelation string `json:"shape_relation,omitempty"`
}

type ProcessorFail added in v0.3.0

type ProcessorFail struct {
	CommonProcessor

	Message string `json:"message"`
}

type ProcessorFingerprint added in v0.3.0

type ProcessorFingerprint struct {
	CommonProcessor

	Fields        []string `json:"fields"`
	TargetField   string   `json:"target_field,omitempty"`
	IgnoreMissing bool     `json:"ignore_missing"`
	Salt          string   `json:"salt,omitempty"`
	Method        string   `json:"method,omitempty"`
}

type ProcessorForeach added in v0.3.0

type ProcessorForeach struct {
	CommonProcessor

	Field         string                 `json:"field"`
	IgnoreMissing bool                   `json:"ignore_missing"`
	Processor     map[string]interface{} `json:"processor"`
}

type ProcessorGeoip added in v0.3.0

type ProcessorGeoip struct {
	ProcessortFields

	DatabaseFile string   `json:"database_file,omitempty"`
	Properties   []string `json:"properties,omitempty"`
	FirstOnly    bool     `json:"first_only"`
}

type ProcessorGrok added in v0.3.0

type ProcessorGrok struct {
	CommonProcessor

	Field              string            `json:"field"`
	Patterns           []string          `json:"patterns"`
	PatternDefinitions map[string]string `json:"pattern_definitions,omitempty"`
	EcsCompatibility   string            `json:"ecs_compatibility,omitempty"`
	TraceMatch         bool              `json:"trace_match"`
	IgnoreMissing      bool              `json:"ignore_missing"`
}

type ProcessorGsub added in v0.3.0

type ProcessorGsub struct {
	CommonProcessor
	ProcessortFields

	Pattern     string `json:"pattern"`
	Replacement string `json:"replacement"`
}

type ProcessorHtmlStrip added in v0.3.0

type ProcessorHtmlStrip struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorJoin added in v0.3.0

type ProcessorJoin struct {
	CommonProcessor

	Field       string `json:"field"`
	Separator   string `json:"separator"`
	TargetField string `json:"target_field,omitempty"`
}

type ProcessorJson added in v0.3.0

type ProcessorJson struct {
	CommonProcessor

	Field                     string `json:"field"`
	TargetField               string `json:"target_field,omitempty"`
	AddToRoot                 *bool  `json:"add_to_root,omitempty"`
	AddToRootConflictStrategy string `json:"add_to_root_conflict_strategy,omitempty"`
	AllowDuplicateKeys        *bool  `json:"allow_duplicate_keys,omitempty"`
}

type ProcessorKV added in v0.3.0

type ProcessorKV struct {
	CommonProcessor
	ProcessortFields

	FieldSplit    string   `json:"field_split"`
	ValueSplit    string   `json:"value_split"`
	IncludeKeys   []string `json:"include_keys,omitempty"`
	ExcludeKeys   []string `json:"exclude_keys,omitempty"`
	Prefix        string   `json:"prefix,omitempty"`
	TrimKey       string   `json:"trim_key,omitempty"`
	TrimValue     string   `json:"trim_value,omitempty"`
	StripBrackets bool     `json:"strip_brackets"`
}

type ProcessorLowercase added in v0.3.0

type ProcessorLowercase struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorNetworkDirection added in v0.3.0

type ProcessorNetworkDirection struct {
	CommonProcessor

	SourceIp              string   `json:"source_ip,omitempty"`
	DestinationIp         string   `json:"destination_ip,omitempty"`
	TargetField           string   `json:"target_field,omitempty"`
	InternalNetworks      []string `json:"internal_networks,omitempty"`
	InternalNetworksField string   `json:"internal_networks_field,omitempty"`
	IgnoreMissing         bool     `json:"ignore_missing"`
}

type ProcessorPipeline added in v0.3.0

type ProcessorPipeline struct {
	CommonProcessor

	Name string `json:"name"`
}

type ProcessorRegisteredDomain added in v0.3.0

type ProcessorRegisteredDomain struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorRemove added in v0.3.0

type ProcessorRemove struct {
	CommonProcessor

	Field         []string `json:"field"`
	IgnoreMissing bool     `json:"ignore_missing"`
}

type ProcessorRename added in v0.3.0

type ProcessorRename struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorScript added in v0.3.0

type ProcessorScript struct {
	CommonProcessor

	Lang     string                 `json:"lang,omitempty"`
	ScriptId string                 `json:"id,omitempty"`
	Source   string                 `json:"source,omitempty"`
	Params   map[string]interface{} `json:"params,omitempty"`
}

type ProcessorSet added in v0.3.0

type ProcessorSet struct {
	CommonProcessor

	Field            string `json:"field"`
	Value            string `json:"value,omitempty"`
	CopyFrom         string `json:"copy_from,omitempty"`
	Override         bool   `json:"override"`
	IgnoreEmptyValue bool   `json:"ignore_empty_value"`
	MediaType        string `json:"media_type,omitempty"`
}

type ProcessorSetSecurityUser added in v0.3.0

type ProcessorSetSecurityUser struct {
	CommonProcessor

	Field      string   `json:"field"`
	Properties []string `json:"properties,omitempty"`
}

type ProcessorSort added in v0.3.0

type ProcessorSort struct {
	CommonProcessor

	Field       string `json:"field"`
	Order       string `json:"order,omitempty"`
	TargetField string `json:"target_field,omitempty"`
}

type ProcessorSplit added in v0.3.0

type ProcessorSplit struct {
	CommonProcessor
	ProcessortFields

	Separator        string `json:"separator"`
	PreserveTrailing bool   `json:"preserve_trailing"`
}

type ProcessorTrim added in v0.3.0

type ProcessorTrim struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorUppercase added in v0.3.0

type ProcessorUppercase struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorUriParts added in v0.3.0

type ProcessorUriParts struct {
	CommonProcessor

	Field              string `json:"field"`
	TargetField        string `json:"target_field,omitempty"`
	KeepOriginal       bool   `json:"keep_original"`
	RemoveIfSuccessful bool   `json:"remove_if_successful"`
}

type ProcessorUrldecode added in v0.3.0

type ProcessorUrldecode struct {
	CommonProcessor
	ProcessortFields
}

type ProcessorUserAgent added in v0.3.0

type ProcessorUserAgent struct {
	ProcessortFields

	RegexFile         string   `json:"regex_file,omitempty"`
	Properties        []string `json:"properties,omitempty"`
	ExtractDeviceType *bool    `json:"extract_device_type,omitempty"`
}

type ProcessortFields added in v0.3.0

type ProcessortFields struct {
	Field         string `json:"field"`
	TargetField   string `json:"target_field,omitempty"`
	IgnoreMissing bool   `json:"ignore_missing"`
}

type PutIndexParams added in v0.6.0

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

type PutTransformParams added in v0.6.0

type PutTransformParams struct {
	DeferValidation bool
	Timeout         time.Duration
	Enabled         bool
}

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 {
	FieldSecurity          *FieldSecurity `json:"field_security,omitempty"`
	Names                  []string       `json:"names"`
	Clusters               []string       `json:"clusters"`
	Privileges             []string       `json:"privileges"`
	Query                  *string        `json:"query,omitempty"`
	AllowRestrictedIndices *bool          `json:"allow_restricted_indices,omitempty"`
}

type Restriction added in v0.11.5

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

type Role

type Role struct {
	Name          string                 `json:"-"`
	Description   *string                `json:"description,omitempty"`
	Applications  []Application          `json:"applications,omitempty"`
	Global        map[string]interface{} `json:"global,omitempty"`
	Cluster       []string               `json:"cluster,omitempty"`
	Indices       []IndexPerms           `json:"indices,omitempty"`
	RemoteIndices []RemoteIndexPerms     `json:"remote_indices,omitempty"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
	RusAs         []string               `json:"run_as,omitempty"`
}

type RoleMapping added in v0.4.0

type RoleMapping struct {
	Name          string                   `json:"-"`
	Enabled       bool                     `json:"enabled"`
	Roles         []string                 `json:"roles,omitempty"`
	RoleTemplates []map[string]interface{} `json:"role_templates,omitempty"`
	Rules         map[string]interface{}   `json:"rules"`
	Metadata      interface{}              `json:"metadata"`
}

type Script added in v0.5.0

type Script struct {
	ID       string                 `json:"-"`
	Language string                 `json:"lang"`
	Source   string                 `json:"source"`
	Params   map[string]interface{} `json:"params"`
	Context  string                 `json:"-"`
}

type Slo added in v0.7.0

type Slo struct {
	SloID           string
	Name            string
	Description     string
	Indicator       slo.SloResponseIndicator
	TimeWindow      slo.TimeWindow
	BudgetingMethod slo.BudgetingMethod
	Objective       slo.Objective
	Settings        *slo.Settings
	SpaceID         string
	GroupBy         *string
	Tags            []string
}

type SnapshortRetention

type SnapshortRetention struct {
	ExpireAfter *string `json:"expire_after,omitempty"`
	MaxCount    *int    `json:"max_count,omitempty"`
	MinCount    *int    `json:"min_count,omitempty"`
}

type SnapshotPolicy

type SnapshotPolicy struct {
	Id         string                `json:"-"`
	Config     *SnapshotPolicyConfig `json:"config,omitempty"`
	Name       string                `json:"name"`
	Repository string                `json:"repository"`
	Retention  *SnapshortRetention   `json:"retention,omitempty"`
	Schedule   string                `json:"schedule"`
}

type SnapshotPolicyConfig

type SnapshotPolicyConfig struct {
	ExpandWildcards    *string                `json:"expand_wildcards,omitempty"`
	IgnoreUnavailable  *bool                  `json:"ignore_unavailable,omitempty"`
	IncludeGlobalState *bool                  `json:"include_global_state,omitempty"`
	Indices            StringSliceOrCSV       `json:"indices,omitempty"`
	FeatureStates      []string               `json:"feature_states,omitempty"`
	Metadata           map[string]interface{} `json:"metadata,omitempty"`
	Partial            *bool                  `json:"partial,omitempty"`
}

type SnapshotRepository

type SnapshotRepository struct {
	Name     string                 `json:"-"`
	Type     string                 `json:"type"`
	Settings map[string]interface{} `json:"settings"`
	Verify   bool                   `json:"verify"`
}

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]interface{} `json:"mappings,omitempty"`
	Settings  map[string]interface{} `json:"settings,omitempty"`
	Lifecycle *LifecycleSettings     `json:"lifecycle,omitempty"`
}

type TimestampField added in v0.3.0

type TimestampField struct {
	Name string `json:"name"`
}

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           interface{}               `json:"pivot,omitempty"`
	Latest          interface{}               `json:"latest,omitempty"`
	Frequency       string                    `json:"frequency,omitempty"`
	RetentionPolicy *TransformRetentionPolicy `json:"retention_policy,omitempty"`
	Sync            *TransformSync            `json:"sync,omitempty"`
	Meta            interface{}               `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           interface{} `json:"query,omitempty"`
	RuntimeMappings interface{} `json:"runtime_mappings,omitempty"`
}

type TransformStats added in v0.6.0

type TransformStats struct {
	Id    string `json:"id"`
	State string `json:"state"`
}

func (*TransformStats) IsStarted added in v0.6.0

func (ts *TransformStats) IsStarted() bool

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 UpdateTransformParams added in v0.6.0

type UpdateTransformParams struct {
	DeferValidation bool
	Timeout         time.Duration
	Enabled         bool
	ApplyEnabled    bool
}

type User

type User struct {
	Username     string                 `json:"-"`
	FullName     string                 `json:"full_name,omitempty"`
	Email        string                 `json:"email,omitempty"`
	Roles        []string               `json:"roles"`
	Password     *string                `json:"password,omitempty"`
	PasswordHash *string                `json:"password_hash,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	Enabled      bool                   `json:"enabled"`
}

func (*User) IsSystemUser added in v0.5.0

func (u *User) IsSystemUser() bool

type UserPassword added in v0.5.0

type UserPassword struct {
	Password     *string `json:"password,omitempty"`
	PasswordHash *string `json:"password_hash,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]interface{} `json:"trigger"`
	Input                     map[string]interface{} `json:"input"`
	Condition                 map[string]interface{} `json:"condition"`
	Actions                   map[string]interface{} `json:"actions"`
	Metadata                  map[string]interface{} `json:"metadata"`
	Transform                 map[string]interface{} `json:"transform,omitempty"`
	Throttle_period_in_millis int                    `json:"throttle_period_in_millis,omitempty"`
}

Jump to

Keyboard shortcuts

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