Documentation ¶
Overview ¶
Package graylog provides Golang's structs which represents Graylog resource such as roles and users. Client and mock server and terraform provider are provided as subpackages.
https://godoc.org/github.com/suzuki-shunsuke/go-graylog/#pkg-subdirectories
I can't understand the reason but it is failed to run "gometalinter ./..." travis ci index_set.go:1::warning: file is not goimported (goimports) index_set.go:1::warning: file is not gofmted with -s (gofmt) nolint: goimports, gofmt
Index ¶
- Constants
- Variables
- func SetFuncGetInputAttrsByType(f GetInputAttrsByTypeIntf)
- func SetFuncGetUnknownTypeInputAttrs(f GetUnknownTypeInputAttrsIntf)
- func SetInputAttrs(args ...NewInputAttrs) error
- type AlertCondition
- type AlertReceivers
- type GetInputAttrsByTypeIntf
- type GetUnknownTypeInputAttrsIntf
- type IndexSet
- type IndexSetStats
- type IndexSetUpdateParams
- type IndexSetsBody
- type Input
- type InputAWSCloudTrailAttrs
- type InputAWSCloudWatchLogsAttrs
- type InputAWSFlowLogsAttrs
- type InputAttrs
- func NewInputAWSCloudTrailAttrs() InputAttrs
- func NewInputAWSCloudWatchLogsAttrs() InputAttrs
- func NewInputAWSFlowLogsAttrs() InputAttrs
- func NewInputAttrsByType(t string) InputAttrs
- func NewInputBeatsAttrs() InputAttrs
- func NewInputCEFAMQPAttrs() InputAttrs
- func NewInputCEFKafkaAttrs() InputAttrs
- func NewInputCEFTCPAttrs() InputAttrs
- func NewInputCEFUDPAttrs() InputAttrs
- func NewInputFakeHTTPMessageAttrs() InputAttrs
- func NewInputGELFAMQPAttrs() InputAttrs
- func NewInputGELFHTTPAttrs() InputAttrs
- func NewInputGELFKafkaAttrs() InputAttrs
- func NewInputGELFTCPAttrs() InputAttrs
- func NewInputGELFUDPAttrs() InputAttrs
- func NewInputJSONPathAttrs() InputAttrs
- func NewInputNetFlowUDPAttrs() InputAttrs
- func NewInputRawAMQPAttrs() InputAttrs
- func NewInputSyslogAMQPAttrs() InputAttrs
- func NewInputSyslogKafkaAttrs() InputAttrs
- func NewInputSyslogTCPAttrs() InputAttrs
- func NewInputSyslogUDPAttrs() InputAttrs
- type InputBeatsAttrs
- type InputCEFAMQPAttrs
- type InputCEFKafkaAttrs
- type InputCEFTCPAttrs
- type InputCEFUDPAttrs
- type InputData
- type InputFakeHTTPMessageAttrs
- type InputGELFAMQPAttrs
- type InputGELFHTTPAttrs
- type InputGELFKafkaAttrs
- type InputGELFTCPAttrs
- type InputGELFUDPAttrs
- type InputJSONPathAttrs
- type InputNetFlowUDPAttrs
- type InputRawAMQPAttrs
- type InputSyslogAMQPAttrs
- type InputSyslogKafkaAttrs
- type InputSyslogTCPAttrs
- type InputSyslogUDPAttrs
- type InputUnknownAttrs
- type InputUpdateParams
- type InputUpdateParamsData
- type InputsBody
- type NewInputAttrs
- type Output
- type Preferences
- type RetentionStrategy
- type Role
- type RoleUpdateParams
- type RolesBody
- type RotationStrategy
- type Startpage
- type Stream
- type StreamRule
- type StreamRuleUpdateParams
- type StreamRulesBody
- type StreamUpdateParams
- type StreamsBody
- type User
- type UserUpdateParams
- type UsersBody
Constants ¶
const ( // MessageCountRotationStrategy is one of index set's rotation strategies. MessageCountRotationStrategy string = "org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategy" // SizeBasedRotationStrategy is one of index set's rotation strategies. SizeBasedRotationStrategy string = "org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategy" // TimeBasedRotationStrategy is one of index set's rotation strategies. TimeBasedRotationStrategy string = "org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategy" // MessageCountRotationStrategyConfig is one of index set's rotation strategy configs. MessageCountRotationStrategyConfig string = "org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategyConfig" // SizeBasedRotationStrategyConfig is one of index set's rotation strategy configs. SizeBasedRotationStrategyConfig string = "org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategyConfig" // TimeBasedRotationStrategyConfig is one of index set's rotation strategy configs. TimeBasedRotationStrategyConfig string = "org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategyConfig" // DeletionRetentionStrategy is one of index set's retention strategies. DeletionRetentionStrategy string = "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy" // ClosingRetentionStrategy is one of index set's retention strategies. ClosingRetentionStrategy string = "org.graylog2.indexer.retention.strategies.ClosingRetentionStrategy" // NoopRetentionStrategy is one of index set's retention strategies. NoopRetentionStrategy string = "org.graylog2.indexer.retention.strategies.NoopRetentionStrategy" // DeletionRetentionStrategyConfig is one of index set's retention strategy configs. DeletionRetentionStrategyConfig string = "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig" // ClosingRetentionStrategyConfig is one of index set's retention strategy configs. ClosingRetentionStrategyConfig string = "org.graylog2.indexer.retention.strategies.ClosingRetentionStrategyConfig" // NoopRetentionStrategyConfig is one of index set's retention strategy configs. NoopRetentionStrategyConfig string = "org.graylog2.indexer.retention.strategies.NoopRetentionStrategyConfig" // CreationDateFormat is the date format used at graylog API's request and response body. CreationDateFormat string = "2006-01-02T15:04:05.000Z" )
const ( // InputTypeAWSCloudTrail is one of input types. InputTypeAWSCloudTrail string = "org.graylog.aws.inputs.cloudtrail.CloudTrailInput" )
const ( // InputTypeAWSCloudWatchLogs is one of input types. InputTypeAWSCloudWatchLogs string = "org.graylog.aws.inputs.cloudwatch.CloudWatchLogsInput" )
const ( // InputTypeAWSFlowLogs is one of input types. InputTypeAWSFlowLogs string = "org.graylog.aws.inputs.flowlogs.FlowLogsInput" )
const ( // InputTypeBeats is one of input types. InputTypeBeats string = "org.graylog.plugins.beats.BeatsInput" )
const ( // InputTypeCEFAMQP is one of input types. InputTypeCEFAMQP string = "org.graylog.plugins.cef.input.CEFAmqpInput" )
const ( // InputTypeCEFKafka is one of input types. InputTypeCEFKafka string = "org.graylog.plugins.cef.input.CEFKafkaInput" )
const ( // InputTypeCEFTCP is one of input types. InputTypeCEFTCP string = "org.graylog.plugins.cef.input.CEFTCPInput" )
const ( // InputTypeCEFUDP is one of input types. InputTypeCEFUDP string = "org.graylog.plugins.cef.input.CEFUDPInput" )
const ( // InputTypeFakeHTTPMessage is one of input types. InputTypeFakeHTTPMessage string = "org.graylog2.inputs.random.FakeHttpMessageInput" )
const ( // InputTypeGELFAMQP is one of input types. InputTypeGELFAMQP string = "org.graylog2.inputs.gelf.amqp.GELFAMQPInput" )
const ( // InputTypeGELFHTTP is one of input types. InputTypeGELFHTTP string = "org.graylog2.inputs.gelf.http.GELFHttpInput" )
const ( // InputTypeGELFKafka is one of input types. InputTypeGELFKafka string = "org.graylog2.inputs.gelf.kafka.GELFKafkaInput" )
const ( // InputTypeGELFTCP is one of input types. InputTypeGELFTCP string = "org.graylog2.inputs.gelf.tcp.GELFTCPInput" )
const ( // InputTypeGELFUDP is one of input types. InputTypeGELFUDP string = "org.graylog2.inputs.gelf.udp.GELFUDPInput" )
const ( // InputTypeJSONPath is one of input types. InputTypeJSONPath string = "org.graylog2.inputs.misc.jsonpath.JsonPathInput" )
const ( // InputTypeNetFlowUDP is one of input types. InputTypeNetFlowUDP string = "org.graylog.plugins.netflow.inputs.NetFlowUdpInput" )
const ( // InputTypeRawAMQP is one of input types. InputTypeRawAMQP string = "org.graylog2.inputs.raw.amqp.RawAMQPInput" )
const ( // InputTypeSyslogAMQP is one of input types. InputTypeSyslogAMQP string = "org.graylog2.inputs.syslog.amqp.SyslogAMQPInput" )
const ( // InputTypeSyslogKafka is one of input types. InputTypeSyslogKafka string = "org.graylog2.inputs.syslog.kafka.SyslogKafkaInput" )
const ( // InputTypeSyslogTCP is one of input types. InputTypeSyslogTCP string = "org.graylog2.inputs.syslog.tcp.SyslogTCPInput" )
const ( // InputTypeSyslogUDP is one of input types. InputTypeSyslogUDP string = "org.graylog2.inputs.syslog.udp.SyslogUDPInput" )
Variables ¶
var ( // InputAttrsIntFieldSet is the set of int fields of all type of input attributes. InputAttrsIntFieldSet = set.NewStrSet() // InputAttrsBoolFieldSet is the set of bool fields of all type of input attributes. InputAttrsBoolFieldSet = set.NewStrSet() // InputAttrsStrFieldSet is the set of string fields of all type of input attributes. InputAttrsStrFieldSet = set.NewStrSet() )
Functions ¶
func SetFuncGetInputAttrsByType ¶
func SetFuncGetInputAttrsByType(f GetInputAttrsByTypeIntf)
SetFuncGetInputAttrsByType customizes NewInputAttrsByType's behavior.
func SetFuncGetUnknownTypeInputAttrs ¶
func SetFuncGetUnknownTypeInputAttrs(f GetUnknownTypeInputAttrsIntf)
SetFuncGetUnknownTypeInputAttrs customizes NewInputAttrsByType's behavior.
func SetInputAttrs ¶
func SetInputAttrs(args ...NewInputAttrs) error
SetInputAttrs sets InputAttrs. You can add the custom InputAttrs and override existing InputAttrs.
Types ¶
type AlertReceivers ¶
type AlertReceivers struct { Emails []string `json:"emails,omitempty"` Users []string `json:"users,omitempty"` }
AlertReceivers represents alert receivers.
type GetInputAttrsByTypeIntf ¶
type GetInputAttrsByTypeIntf func(map[string]NewInputAttrs, string) InputAttrs
GetInputAttrsByTypeIntf returns a given type InputAttrs.
func GetFuncGetInputAttrsByType ¶
func GetFuncGetInputAttrsByType() GetInputAttrsByTypeIntf
GetFuncGetInputAttrsByType returns the global GetInputAttrsByType function. Mainly this is used to prevent global pollution at test.
f := graylog.GetFuncGetInputAttrsByType() // change the global function temporary defer graylog.SetFuncGetInputAttrsByType(f) graylog.SetFuncGetInputAttrsByType(customFunc)
type GetUnknownTypeInputAttrsIntf ¶
type GetUnknownTypeInputAttrsIntf func(map[string]NewInputAttrs, string) InputAttrs
GetUnknownTypeInputAttrsIntf returns an unknown type InputAttrs.
func GetFuncGetUnknownTypeInputAttrs ¶
func GetFuncGetUnknownTypeInputAttrs() GetUnknownTypeInputAttrsIntf
GetFuncGetUnknownTypeInputAttrs returns the global GetUnknownTypeInputAttrs function. Mainly this is used to prevent global pollution at test.
f := graylog.GetFuncGetUnknownTypeInputAttrs() // change the global function temporary defer graylog.SetFuncGetUnknownTypeInputAttrs(f) graylog.SetFuncGetUnknownTypeInputAttrs(customFunc)
type IndexSet ¶
type IndexSet struct { // required Title string `json:"title,omitempty" v-create:"required"` // ^[a-z0-9][a-z0-9_+-]*$ IndexPrefix string `json:"index_prefix,omitempty" v-create:"required,indexprefixregexp"` // ex. "org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategy" RotationStrategyClass string `json:"rotation_strategy_class,omitempty" v-create:"required"` RotationStrategy *RotationStrategy `json:"rotation_strategy,omitempty" v-create:"required"` // ex. "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategy" RetentionStrategyClass string `json:"retention_strategy_class,omitempty" v-create:"required"` RetentionStrategy *RetentionStrategy `json:"retention_strategy,omitempty" v-create:"required"` // ex. "2018-02-20T11:37:19.305Z" CreationDate string `json:"creation_date,omitempty"` IndexAnalyzer string `json:"index_analyzer,omitempty" v-create:"required"` Shards int `json:"shards,omitempty" v-create:"required"` IndexOptimizationMaxNumSegments int `json:"index_optimization_max_num_segments,omitempty" v-create:"required"` ID string `json:"id,omitempty" v-create:"isdefault"` Description string `json:"description,omitempty"` Replicas int `json:"replicas,omitempty"` IndexOptimizationDisabled bool `json:"index_optimization_disabled,omitempty"` Writable bool `json:"writable,omitempty"` Default bool `json:"default,omitempty"` Stats *IndexSetStats `json:"-"` }
IndexSet represents a Graylog's Index Set. http://docs.graylog.org/en/2.4/pages/configuration/index_model.html#index-set-configuration
func (*IndexSet) CreationTime ¶
CreationTime returns a creation date converted to time.Time.
func (*IndexSet) NewUpdateParams ¶
func (is *IndexSet) NewUpdateParams() *IndexSetUpdateParams
NewUpdateParams converts an IndexSet to IndexSetUpdateParams.
func (*IndexSet) SetCreateDefaultValues ¶
func (is *IndexSet) SetCreateDefaultValues()
SetCreateDefaultValues sets the default values of Create Index Set API.
func (*IndexSet) SetCreationTime ¶
SetCreationTime sets a creation date with time.Time.
type IndexSetStats ¶
type IndexSetStats struct { Indices int `json:"indices"` Documents int `json:"documents"` Size int `json:"size"` }
IndexSetStats represents a Graylog's Index Set Stats.
type IndexSetUpdateParams ¶
type IndexSetUpdateParams struct { Title string `json:"title" v-update:"required"` IndexPrefix string `json:"index_prefix" v-update:"required,indexprefixregexp"` RotationStrategyClass string `json:"rotation_strategy_class" v-update:"required"` RotationStrategy *RotationStrategy `json:"rotation_strategy" v-update:"required"` RetentionStrategyClass string `json:"retention_strategy_class" v-update:"required"` RetentionStrategy *RetentionStrategy `json:"retention_strategy" v-update:"required"` IndexAnalyzer string `json:"index_analyzer" v-update:"required"` Shards int `json:"shards" v-update:"required"` IndexOptimizationMaxNumSegments int `json:"index_optimization_max_num_segments" v-update:"required"` ID string `json:"id" v-update:"required,objectid"` Description *string `json:"description,omitempty"` Replicas *int `json:"replicas,omitempty"` IndexOptimizationDisabled *bool `json:"index_optimization_disabled,omitempty"` Writable *bool `json:"writable,omitempty"` }
IndexSetUpdateParams represents a Graylog's Index Set Update API's parameter. http://docs.graylog.org/en/2.4/pages/configuration/index_model.html#index-set-configuration
type IndexSetsBody ¶
type IndexSetsBody struct { IndexSets []IndexSet `json:"index_sets"` Stats map[string]IndexSetStats `json:"stats"` Total int `json:"total"` }
IndexSetsBody represents Get Index Sets API's response body. Basically users don't use this struct, but this struct is public because some sub packages use this struct.
type Input ¶
type Input struct { // Select a name of your new input that describes it. Title string `json:"title,omitempty" v-create:"required"` // https://github.com/Graylog2/graylog2-server/issues/3480 // update input overwrite attributes Attrs InputAttrs `json:"attributes,omitempty" v-create:"required"` ID string `json:"id,omitempty" v-create:"isdefault"` // Should this input start on all nodes Global bool `json:"global,omitempty"` // On which node should this input start // ex. "2ad6b340-3e5f-4a96-ae81-040cfb8b6024" Node string `json:"node,omitempty"` // ex. 2018-02-24T03:02:26.001Z CreatedAt string `json:"created_at,omitempty" v-create:"isdefault"` // ex. "admin" CreatorUserID string `json:"creator_user_id,omitempty" v-create:"isdefault"` }
Input represents Graylog Input.
func (*Input) MarshalJSON ¶
MarshalJSON is the implementation of the json.Marshaler interface.
func (*Input) NewUpdateParams ¶
func (input *Input) NewUpdateParams() *InputUpdateParams
NewUpdateParams converts Input to InputUpdateParams.
func (*Input) UnmarshalJSON ¶
UnmarshalJSON is the implementation of the json.Unmarshaler interface.
type InputAWSCloudTrailAttrs ¶
type InputAWSCloudTrailAttrs struct { CreatorUserID string `json:"creator_user_id,omitempty" v-create:"isdefault"` AWSAssumeRoleArn string `json:"aws_assume_role_arn,omitempty"` AWSAccessKey string `json:"aws_access_key,omitempty"` AWSSecretKey string `json:"aws_secret_key,omitempty"` AWSSQSRegion string `json:"aws_sqs_region,omitempty"` AWSSQSQueueName string `json:"aws_sqs_queue_name,omitempty"` AWSS3Region string `json:"aws_s3_region,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` OverrideSource string `json:"override_source,omitempty"` }
InputAWSCloudTrailAttrs represents aws cloud trail Input's attributes.
func (InputAWSCloudTrailAttrs) InputType ¶
func (attrs InputAWSCloudTrailAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputAWSCloudWatchLogsAttrs ¶
type InputAWSCloudWatchLogsAttrs struct { AWSRegion string `json:"aws_region,omitempty"` AWSAssumeRoleArn string `json:"aws_assume_role_arn,omitempty"` AWSAccessKey string `json:"aws_access_key,omitempty"` AWSSecretKey string `json:"aws_secret_key,omitempty"` KinesisStreamName string `json:"kinesis_stream_name,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` OverrideSource string `json:"override_source,omitempty"` }
InputAWSCloudWatchLogsAttrs represents AWS logs Input's attributes.
func (InputAWSCloudWatchLogsAttrs) InputType ¶
func (attrs InputAWSCloudWatchLogsAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputAWSFlowLogsAttrs ¶
type InputAWSFlowLogsAttrs struct { AWSRegion string `json:"aws_region,omitempty"` AWSAssumeRoleArn string `json:"aws_assume_role_arn,omitempty"` AWSAccessKey string `json:"aws_access_key,omitempty"` AWSSecretKey string `json:"aws_secret_key,omitempty"` KinesisStreamName string `json:"kinesis_stream_name,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` }
InputAWSFlowLogsAttrs represents AWS flow logs Input's attributes.
func (InputAWSFlowLogsAttrs) InputType ¶
func (attrs InputAWSFlowLogsAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputAttrs ¶
type InputAttrs interface {
InputType() string
}
InputAttrs represents Input Attributes. A receiver must be a pointer.
func NewInputAWSCloudTrailAttrs ¶
func NewInputAWSCloudTrailAttrs() InputAttrs
NewInputAWSCloudTrailAttrs is the constructor of InputAWSCloudTrailAttrs.
func NewInputAWSCloudWatchLogsAttrs ¶
func NewInputAWSCloudWatchLogsAttrs() InputAttrs
NewInputAWSCloudWatchLogsAttrs is the constructor of InputAWSCloudWatchLogsAttrs.
func NewInputAWSFlowLogsAttrs ¶
func NewInputAWSFlowLogsAttrs() InputAttrs
NewInputAWSFlowLogsAttrs is the constructor of InputAWSFlowLogsAttrs.
func NewInputAttrsByType ¶
func NewInputAttrsByType(t string) InputAttrs
NewInputAttrsByType returns a new InputAttrs.
func NewInputBeatsAttrs ¶
func NewInputBeatsAttrs() InputAttrs
NewInputBeatsAttrs is the constructor of InputBeatsAttrs.
func NewInputCEFAMQPAttrs ¶
func NewInputCEFAMQPAttrs() InputAttrs
NewInputCEFAMQPAttrs is the constructor of InputCEFAMQPAttrs.
func NewInputCEFKafkaAttrs ¶
func NewInputCEFKafkaAttrs() InputAttrs
NewInputCEFKafkaAttrs is the constructor of InputCEFKafkaAttrs.
func NewInputCEFTCPAttrs ¶
func NewInputCEFTCPAttrs() InputAttrs
NewInputCEFTCPAttrs is the constructor of InputCEFTCPAttrs.
func NewInputCEFUDPAttrs ¶
func NewInputCEFUDPAttrs() InputAttrs
NewInputCEFUDPAttrs is the constructor of InputCEFUDPAttrs.
func NewInputFakeHTTPMessageAttrs ¶
func NewInputFakeHTTPMessageAttrs() InputAttrs
NewInputFakeHTTPMessageAttrs is the constructor of InputFakeHTTPMessageAttrs.
func NewInputGELFAMQPAttrs ¶
func NewInputGELFAMQPAttrs() InputAttrs
NewInputGELFAMQPAttrs is the constructor of InputGELFAMQPAttrs.
func NewInputGELFHTTPAttrs ¶
func NewInputGELFHTTPAttrs() InputAttrs
NewInputGELFHTTPAttrs is the constructor of InputGELFHTTPAttrs.
func NewInputGELFKafkaAttrs ¶
func NewInputGELFKafkaAttrs() InputAttrs
NewInputGELFKafkaAttrs is the constructor of InputGELFKafkaAttrs.
func NewInputGELFTCPAttrs ¶
func NewInputGELFTCPAttrs() InputAttrs
NewInputGELFTCPAttrs is the constructor of InputGELFTCPAttrs.
func NewInputGELFUDPAttrs ¶
func NewInputGELFUDPAttrs() InputAttrs
NewInputGELFUDPAttrs is the constructor of InputGELFUDPAttrs.
func NewInputJSONPathAttrs ¶
func NewInputJSONPathAttrs() InputAttrs
NewInputJSONPathAttrs is the constructor of InputJSONPathAttrs.
func NewInputNetFlowUDPAttrs ¶
func NewInputNetFlowUDPAttrs() InputAttrs
NewInputNetFlowUDPAttrs is the constructor of InputNetFlowUDPAttrs.
func NewInputRawAMQPAttrs ¶
func NewInputRawAMQPAttrs() InputAttrs
NewInputRawAMQPAttrs is the constructor of InputRawAMQPAttrs.
func NewInputSyslogAMQPAttrs ¶
func NewInputSyslogAMQPAttrs() InputAttrs
NewInputSyslogAMQPAttrs is the constructor of InputSyslogAMQPAttrs.
func NewInputSyslogKafkaAttrs ¶
func NewInputSyslogKafkaAttrs() InputAttrs
NewInputSyslogKafkaAttrs is the constructor of InputSyslogKafkaAttrs.
func NewInputSyslogTCPAttrs ¶
func NewInputSyslogTCPAttrs() InputAttrs
NewInputSyslogTCPAttrs is the constructor of InputSyslogTCPAttrs.
func NewInputSyslogUDPAttrs ¶
func NewInputSyslogUDPAttrs() InputAttrs
NewInputSyslogUDPAttrs is the constructor of InputSyslogUDPAttrs.
type InputBeatsAttrs ¶
type InputBeatsAttrs struct { BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` OverrideSource string `json:"override_source,omitempty"` TLSKeyFile string `json:"tls_key_file,omitempty"` TLSKeyPassword string `json:"tls_key_password,omitempty"` TLSClientAuthCertFile string `json:"tls_client_auth_cert_file,omitempty"` TLSClientAuth string `json:"tls_client_auth,omitempty"` TLSCertFile string `json:"tls_cert_file,omitempty"` TLSEnable bool `json:"tls_enable,omitempty"` TCPKeepAlive bool `json:"tcp_keepalive,omitempty"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` }
InputBeatsAttrs represents Beats Input's attributes.
func (InputBeatsAttrs) InputType ¶
func (attrs InputBeatsAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputCEFAMQPAttrs ¶
type InputCEFAMQPAttrs struct { Exchange string `json:"exchange,omitempty"` Timezone string `json:"timezone,omitempty"` BrokerPassword string `json:"broker_password,omitempty"` Locale string `json:"locale,omitempty"` BrokerHostname string `json:"broker_hostname,omitempty"` Queue string `json:"queue,omitempty"` BrokerVHost string `json:"broker_vhost,omitempty"` BrokerUsername string `json:"broker_username,omitempty"` RoutingKey string `json:"routing_key,omitempty"` Heartbeat int `json:"heartbeat,omitempty"` ParallelQueues int `json:"parallel_queues,omitempty"` Prefetch int `json:"prefetch,omitempty"` BrokerPort int `json:"broker_port,omitempty"` ExchangeBind bool `json:"exchange_bind,omitempty"` RequeueInvalidMessages bool `json:"requeue_invalid_messages,omitempty"` UseFullNames bool `json:"use_full_names,omitempty"` TLS bool `json:"tls,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` }
InputCEFAMQPAttrs represents CEF AMQP Input's attributes.
func (InputCEFAMQPAttrs) InputType ¶
func (attrs InputCEFAMQPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputCEFKafkaAttrs ¶
type InputCEFKafkaAttrs struct { ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` UseFullNames bool `json:"use_full_names,omitempty"` Locale string `json:"locale,omitempty"` Zookeeper string `json:"zookeeper,omitempty"` Timezone string `json:"timezone,omitempty"` TopicFilter string `json:"topic_filter,omitempty"` OffsetReset string `json:"offset_reset,omitempty"` Threads int `json:"threads,omitempty"` FetchWaitMax int `json:"fetch_wait_max,omitempty"` FetchMinBytes int `json:"fetch_min_bytes,omitempty"` }
InputCEFKafkaAttrs represents CEF Kafka Input's attributes.
func (InputCEFKafkaAttrs) InputType ¶
func (attrs InputCEFKafkaAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputCEFTCPAttrs ¶
type InputCEFTCPAttrs struct { UseNullDelimiter bool `json:"use_null_delimiter,omitempty"` UseFullNames bool `json:"use_full_names,omitempty"` TLSEnable bool `json:"tls_enable,omitempty"` TCPKeepAlive bool `json:"tcp_keepalive,omitempty"` MaxMessageSize int `json:"max_message_size,omitempty"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` Timezone string `json:"timezone,omitempty"` Locale string `json:"locale,omitempty"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` TLSKeyFile string `json:"tls_key_file,omitempty"` TLSClientAuth string `json:"tls_client_auth,omitempty"` TLSKeyPassword string `json:"tls_key_password,omitempty"` TLSClientAuthCertFile string `json:"tls_client_auth_cert_file,omitempty"` TLSCertFile string `json:"tls_cert_file,omitempty"` }
InputCEFTCPAttrs represents CEF TCP Input's attributes.
func (InputCEFTCPAttrs) InputType ¶
func (attrs InputCEFTCPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputCEFUDPAttrs ¶
type InputCEFUDPAttrs struct { Locale string `json:"locale,omitempty"` UseFullNames bool `json:"use_full_names,omitempty"` Timezone string `json:"timezone,omitempty"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` }
InputCEFUDPAttrs represents CEF UDP Input's attributes.
func (InputCEFUDPAttrs) InputType ¶
func (attrs InputCEFUDPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputData ¶
type InputData struct { Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` Node string `json:"node,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatorUserID string `json:"creator_user_id,omitempty"` Global bool `json:"global,omitempty"` Attrs map[string]interface{} `json:"attributes,omitempty"` }
InputData represents data of Input. This is used for data conversion of Input. ex. json.Unmarshal
type InputFakeHTTPMessageAttrs ¶
type InputFakeHTTPMessageAttrs struct { Sleep int `json:"sleep,omitempty"` SleepDeviation int `json:"sleep_deviation,omitempty"` Source string `json:"source,omitempty"` OverrideSource string `json:"override_source,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` }
InputFakeHTTPMessageAttrs represents fake HTTP message Input's attributes.
func (InputFakeHTTPMessageAttrs) InputType ¶
func (attrs InputFakeHTTPMessageAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputGELFAMQPAttrs ¶
type InputGELFAMQPAttrs struct { ExchangeBind bool `json:"exchange_bind,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` TLS bool `json:"tls,omitempty"` RequeueInvalidMessages bool `json:"requeue_invalid_messages,omitempty"` BrokerVHost string `json:"broker_vhost,omitempty"` BrokerUsername string `json:"broker_username,omitempty"` Queue string `json:"queue,omitempty"` RoutingKey string `json:"routing_key,omitempty"` OverrideSource string `json:"override_source,omitempty"` BrokerHostname string `json:"broker_hostname,omitempty"` Exchange string `json:"exchange,omitempty"` BrokerPassword string `json:"broker_password,omitempty"` Prefetch int `json:"prefetch,omitempty"` Heartbeat int `json:"heartbeat,omitempty"` DecompressSizeLimit int `json:"decompress_size_limit,omitempty"` BrokerPort int `json:"broker_port,omitempty"` ParallelQueues int `json:"parallel_queues,omitempty"` }
InputGELFAMQPAttrs represents GELF AMQP Input's attributes.
func (InputGELFAMQPAttrs) InputType ¶
func (attrs InputGELFAMQPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputGELFHTTPAttrs ¶
type InputGELFHTTPAttrs struct { IdleWriterTimeOut int `json:"idle_writer_timeout,omitempty"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` MaxChunkSize int `json:"max_chunk_size,omitempty"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` DecompressSizeLimit int `json:"decompress_size_limit,omitempty"` TLSClientAuthCertFile string `json:"tls_client_auth_cert_file,omitempty"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` TLSCertFile string `json:"tls_cert_file,omitempty"` TLSKeyFile string `json:"tls_key_file,omitempty"` TLSKeyPassword string `json:"tls_key_password,omitempty"` TLSClientAuth string `json:"tls_client_auth,omitempty"` OverrideSource string `json:"override_source,omitempty"` TCPKeepAlive bool `json:"tcp_keepalive,omitempty"` EnableCORS bool `json:"enable_cors,omitempty"` TLSEnable bool `json:"tls_enable,omitempty"` }
InputGELFHTTPAttrs represents GELF HTTP Input's attributes.
func (InputGELFHTTPAttrs) InputType ¶
func (attrs InputGELFHTTPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputGELFKafkaAttrs ¶
type InputGELFKafkaAttrs struct { OverrideSource string `json:"override_source,omitempty"` DecompressSizeLimit int `json:"decompress_size_limit,omitempty"` TopicFilter string `json:"topic_filter,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` FetchWaitMax int `json:"fetch_wait_max,omitempty"` FetchMinBytes int `json:"fetch_min_bytes,omitempty"` OffsetReset string `json:"offset_reset,omitempty"` Threads int `json:"threads,omitempty"` Zookeeper string `json:"zookeeper,omitempty"` }
InputGELFKafkaAttrs represents GELF Kafka Input's attributes.
func (InputGELFKafkaAttrs) InputType ¶
func (attrs InputGELFKafkaAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputGELFTCPAttrs ¶
type InputGELFTCPAttrs struct { MaxMessageSize int `json:"max_message_size,omitempty"` DecompressSizeLimit int `json:"decompress_size_limit,omitempty"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` OverrideSource string `json:"override_source,omitempty"` TLSKeyFile string `json:"tls_key_file,omitempty"` TLSKeyPassword string `json:"tls_key_password,omitempty"` TLSClientAuthCertFile string `json:"tls_client_auth_cert_file,omitempty"` TLSClientAuth string `json:"tls_client_auth,omitempty"` TLSCertFile string `json:"tls_cert_file,omitempty"` UseNullDelimiter bool `json:"use_null_delimiter,omitempty"` TLSEnable bool `json:"tls_enable,omitempty"` TCPKeepAlive bool `json:"tcp_keepalive,omitempty"` }
InputGELFTCPAttrs represents GELF TCP Input's attributes.
func (InputGELFTCPAttrs) InputType ¶
func (attrs InputGELFTCPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputGELFUDPAttrs ¶
type InputGELFUDPAttrs struct { DecompressSizeLimit int `json:"decompress_size_limit,omitempty"` OverrideSource string `json:"override_source,omitempty"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` }
InputGELFUDPAttrs represents GELF UDP Input's attributes.
func (InputGELFUDPAttrs) InputType ¶
func (attrs InputGELFUDPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputJSONPathAttrs ¶
type InputJSONPathAttrs struct { ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` OverrideSource string `json:"override_source,omitempty"` Headers string `json:"headers,omitempty"` Path string `json:"path,omitempty"` TargetURL string `json:"target_url,omitempty"` Interval int `json:"interval,omitempty"` Source string `json:"source,omitempty"` Timeunit string `json:"timeunit,omitempty"` }
InputJSONPathAttrs represents JSON path Input's attributes.
func (InputJSONPathAttrs) InputType ¶
func (attrs InputJSONPathAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputNetFlowUDPAttrs ¶
type InputNetFlowUDPAttrs struct { NetFlow9DefinitionsPath string `json:"netflow9_definitions_path,omitempty"` OverrideSource string `json:"override_source,omitempty"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` }
InputNetFlowUDPAttrs represents net flow UDP Input's attributes.
func (InputNetFlowUDPAttrs) InputType ¶
func (attrs InputNetFlowUDPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputRawAMQPAttrs ¶
type InputRawAMQPAttrs struct { ParallelQueues int `json:"parallel_queues,omitempty"` HeartBeat int `json:"heartbeat,omitempty"` BrokerPort int `json:"broker_port,omitempty"` Prefetch int `json:"prefetch,omitempty"` RequeueInvalidMessages bool `json:"requeue_invalid_messages,omitempty"` TLS bool `json:"tls,omitempty"` ExchangeBind bool `json:"exchange_bind,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` Exchange string `json:"exchange,omitempty"` RoutingKey string `json:"routing_key,omitempty"` BrokerHostname string `json:"broker_hostname,omitempty"` Queue string `json:"queue,omitempty"` BrokerPassword string `json:"broker_password,omitempty"` BrokerVHost string `json:"broker_vhost,omitempty"` BrokerUsername string `json:"broker_username,omitempty"` OverrideSource string `json:"override_source,omitempty"` }
InputRawAMQPAttrs represents raw AMQP Input's attributes.
func (InputRawAMQPAttrs) InputType ¶
func (attrs InputRawAMQPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputSyslogAMQPAttrs ¶
type InputSyslogAMQPAttrs struct { Heartbeat int `json:"heartbeat,omitempty"` Prefetch int `json:"prefetch,omitempty"` BrokerPort int `json:"broker_port,omitempty"` ParallelQueues int `json:"parallel_queues,omitempty"` BrokerVHost string `json:"broker_vhost,omitempty"` BrokerUsername string `json:"broker_username,omitempty"` BrokerPassword string `json:"broker_password,omitempty"` Exchange string `json:"exchange,omitempty"` OverrideSource string `json:"override_source,omitempty"` RoutingKey string `json:"routing_key,omitempty"` BrokerHostname string `json:"broker_hostname,omitempty"` Queue string `json:"queue,omitempty"` ExchangeBind bool `json:"exchange_bind,omitempty"` ForceRDNS bool `json:"force_rdns,omitempty"` StoreFullMessage bool `json:"store_full_message,omitempty"` ExpandStructuredData bool `json:"expand_structured_data,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` TLS bool `json:"tls,omitempty"` AllowOverrideDate bool `json:"allow_override_date,omitempty"` RequeueInvalidMessages bool `json:"requeue_invalid_messages,omitempty"` }
InputSyslogAMQPAttrs represents SyslogAMQP Input's attributes.
func (InputSyslogAMQPAttrs) InputType ¶
func (attrs InputSyslogAMQPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputSyslogKafkaAttrs ¶
type InputSyslogKafkaAttrs struct { ForceRDNS bool `json:"force_rdns,omitempty"` StoreFullMessage bool `json:"store_full_message,omitempty"` ExpandStructuredData bool `json:"expand_structured_data,omitempty"` AllowOverrideDate bool `json:"allow_override_date,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` OverrideSource string `json:"override_source,omitempty"` TopicFilter string `json:"topic_filter,omitempty"` FetchWaitMax int `json:"fetch_wait_max,omitempty"` OffsetReset string `json:"offset_reset,omitempty"` Zookeeper string `json:"zookeeper,omitempty"` FetchMinBytes int `json:"fetch_min_bytes,omitempty"` Threads int `json:"threads,omitempty"` }
InputSyslogKafkaAttrs represents SyslogKafka Input's attributes.
func (InputSyslogKafkaAttrs) InputType ¶
func (attrs InputSyslogKafkaAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputSyslogTCPAttrs ¶
type InputSyslogTCPAttrs struct { Port int `json:"port,omitempty" v-create:"required" v-update:"required"` BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` }
InputSyslogTCPAttrs represents SyslogTCP Input's attributes.
func (InputSyslogTCPAttrs) InputType ¶
func (attrs InputSyslogTCPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputSyslogUDPAttrs ¶
type InputSyslogUDPAttrs struct { BindAddress string `json:"bind_address,omitempty" v-create:"required" v-update:"required"` Port int `json:"port,omitempty" v-create:"required" v-update:"required"` RecvBufferSize int `json:"recv_buffer_size,omitempty" v-create:"required" v-update:"required"` TCPKeepAlive bool `json:"tcp_keepalive,omitempty"` TLSEnable bool `json:"tls_enable,omitempty"` ThrottlingAllowed bool `json:"throttling_allowed,omitempty"` EnableCORS bool `json:"enable_cors,omitempty"` UseNullDelimiter bool `json:"use_null_delimiter,omitempty"` ExchangeBind bool `json:"exchange_bind,omitempty"` ForceRDNS bool `json:"force_rdns,omitempty"` StoreFullMessage bool `json:"store_full_message,omitempty"` ExpandStructuredData bool `json:"expand_structured_data,omitempty"` AllowOverrideDate bool `json:"allow_override_date,omitempty"` RequeueInvalidMessages bool `json:"requeue_invalid_messages,omitempty"` UseFullNames bool `json:"use_full_names,omitempty"` TLS bool `json:"tls,omitempty"` }
InputSyslogUDPAttrs represents SyslogUDP Input's attributes.
func (InputSyslogUDPAttrs) InputType ¶
func (attrs InputSyslogUDPAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputUnknownAttrs ¶
type InputUnknownAttrs struct { Data map[string]interface{} // contains filtered or unexported fields }
InputUnknownAttrs represents unknown type's Input Attrs.
func (InputUnknownAttrs) InputType ¶
func (attrs InputUnknownAttrs) InputType() string
InputType is the implementation of the InputAttrs interface.
type InputUpdateParams ¶
type InputUpdateParams struct { ID string `json:"id,omitempty" v-update:"required,objectid"` Title string `json:"title,omitempty" v-update:"required"` Type string `json:"type,omitempty" v-update:"required"` Attrs InputAttrs `json:"attributes,omitempty" v-update:"required"` Global *bool `json:"global,omitempty"` Node string `json:"node,omitempty"` }
InputUpdateParams represents Graylog Input update API's parameter.
type InputUpdateParamsData ¶
type InputUpdateParamsData struct { ID string `json:"id,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type,omitempty"` Node string `json:"node,omitempty"` Global *bool `json:"global,omitempty"` Attrs map[string]interface{} `json:"attributes,omitempty"` }
InputUpdateParamsData represents InputUpdateParams's data. This is used for data conversion of InputUpdateParams. ex. json.Unmarshal
func (*InputUpdateParamsData) ToInputUpdateParams ¶
func (d *InputUpdateParamsData) ToInputUpdateParams(input *InputUpdateParams) error
ToInputUpdateParams copies InputUpdateParamsData's data to InputUpdateParams.
type InputsBody ¶
InputsBody represents Get Inputs API's response body. Basically users don't use this struct, but this struct is public because some sub packages use this struct.
type NewInputAttrs ¶
type NewInputAttrs func() InputAttrs
NewInputAttrs is the constructor of InputAttrs.
type Preferences ¶
type Preferences struct { UpdateUnfocussed bool `json:"updateUnfocussed,omitempty"` EnableSmartSearch bool `json:"enableSmartSearch,omitempty"` }
Preferences represents user's preferences.
type RetentionStrategy ¶
type RetentionStrategy struct { // ex. "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig" Type string `json:"type,omitempty"` // ex. 20 MaxNumberOfIndices int `json:"max_number_of_indices,omitempty"` }
RetentionStrategy represents a Graylog's Index Set Retention Strategy.
func NewClosingRetentionStrategy ¶
func NewClosingRetentionStrategy(num int) *RetentionStrategy
NewClosingRetentionStrategy returns a new closing RetentionStrategy.
func NewDeletionRetentionStrategy ¶
func NewDeletionRetentionStrategy(num int) *RetentionStrategy
NewDeletionRetentionStrategy returns a new deletion RetentionStrategy.
func NewNoopRetentionStrategy ¶
func NewNoopRetentionStrategy(num int) *RetentionStrategy
NewNoopRetentionStrategy returns a new noop RetentionStrategy.
type Role ¶
type Role struct { Name string `json:"name,omitempty" v-create:"required" v-update:"required"` Description string `json:"description,omitempty"` // ex. ["clusterconfigentry:read", "users:edit"] Permissions set.StrSet `json:"permissions,omitempty" v-create:"required" v-update:"required"` ReadOnly bool `json:"read_only,omitempty"` }
Role represents a role.
func (*Role) NewUpdateParams ¶
func (role *Role) NewUpdateParams() *RoleUpdateParams
NewUpdateParams returns Update Role API's parameters.
type RoleUpdateParams ¶
type RoleUpdateParams struct { Name string `json:"name,omitempty" v-create:"required" v-update:"required"` Description *string `json:"description,omitempty"` // ex. ["clusterconfigentry:read", "users:edit"] Permissions set.StrSet `json:"permissions,omitempty" v-create:"required" v-update:"required"` }
RoleUpdateParams represents Update Role API's parameters.
type RolesBody ¶
RolesBody represents Get Roles API's response body. Basically users don't use this struct, but this struct is public because some sub packages use this struct.
type RotationStrategy ¶
type RotationStrategy struct { // ex. "org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategyConfig" Type string `json:"type,omitempty"` // ex. 20000000 // Maximum number of documents in an index before it gets rotated MaxDocsPerIndex int `json:"max_docs_per_index,omitempty"` // time based // How long an index gets written to before it is rotated. (i.e. "P1D" for 1 day, "PT6H" for 6 hours) RotationPeriod string `json:"rotation_period,omitempty"` // size based // Maximum size of an index before it gets rotated MaxSize int `json:"max_size,omitempty"` }
RotationStrategy represents a Graylog's Index Set Rotation Strategy.
func NewMessageCountRotationStrategy ¶
func NewMessageCountRotationStrategy(count int) *RotationStrategy
NewMessageCountRotationStrategy returns a new message count based RotationStrategy.
func NewSizeBasedRotationStrategy ¶
func NewSizeBasedRotationStrategy(size int) *RotationStrategy
NewSizeBasedRotationStrategy returns a new size based RotationStrategy.
func NewTimeBasedRotationStrategy ¶
func NewTimeBasedRotationStrategy(period string) *RotationStrategy
NewTimeBasedRotationStrategy returns a new time based RotationStrategy.
type Stream ¶
type Stream struct { ID string `json:"id,omitempty" v-create:"isdefault" v-update:"required,objectid"` Title string `json:"title,omitempty" v-create:"required"` IndexSetID string `json:"index_set_id,omitempty" v-create:"required"` // ex. "2018-02-20T11:37:19.371Z" CreatedAt string `json:"created_at,omitempty" v-create:"isdefault"` // ex. local:admin CreatorUserID string `json:"creator_user_id,omitempty" v-create:"isdefault"` Description string `json:"description,omitempty"` // ex. "AND" MatchingType string `json:"matching_type,omitempty"` Outputs []Output `json:"outputs,omitempty" v-create:"isdefault"` Rules []StreamRule `json:"rules,omitempty"` AlertConditions []AlertCondition `json:"alert_conditions,omitempty" v-create:"isdefault"` AlertReceivers *AlertReceivers `json:"alert_receivers,omitempty" v-create:"isdefault"` Disabled bool `json:"disabled,omitempty" v-create:"isdefault"` RemoveMatchesFromDefaultStream bool `json:"remove_matches_from_default_stream,omitempty"` IsDefault bool `json:"is_default,omitempty" v-create:"isdefault"` }
Stream represents a steram.
func (*Stream) NewUpdateParams ¶
func (stream *Stream) NewUpdateParams() *StreamUpdateParams
NewUpdateParams converts Stream to StreamUpdateParams.
type StreamRule ¶
type StreamRule struct { ID string `json:"id,omitempty" v-create:"isdefault"` StreamID string `json:"stream_id,omitempty" v-create:"required"` Field string `json:"field,omitempty" v-create:"required"` Value string `json:"value,omitempty" v-create:"required"` Description string `json:"description,omitempty"` Type int `json:"type,omitempty"` Inverted bool `json:"inverted,omitempty"` }
StreamRule represents a stream rule.
func (*StreamRule) NewUpdateParams ¶
func (rule *StreamRule) NewUpdateParams() *StreamRuleUpdateParams
NewUpdateParams converts StreamRule to StreamRuleUpdateParams.
type StreamRuleUpdateParams ¶
type StreamRuleUpdateParams struct { ID string `json:"id,omitempty" v-update:"required,objectid"` StreamID string `json:"stream_id,omitempty" v-update:"required,objectid"` Field string `json:"field,omitempty" v-update:"required"` Value string `json:"value,omitempty" v-update:"required"` Description string `json:"description,omitempty"` Type *int `json:"type,omitempty"` Inverted *bool `json:"inverted,omitempty"` }
StreamRuleUpdateParams represents Update Stream API's paramteres.
type StreamRulesBody ¶
type StreamRulesBody struct { Total int `json:"total"` StreamRules []StreamRule `json:"stream_rules"` }
StreamRulesBody represents Get stream rules API's response body. Basically users don't use this struct, but this struct is public because some sub packages use this struct.
type StreamUpdateParams ¶
type StreamUpdateParams struct { ID string `json:"id,omitempty" v-update:"required,objectid"` Title string `json:"title,omitempty"` IndexSetID string `json:"index_set_id,omitempty"` Description string `json:"description,omitempty"` Outputs []Output `json:"outputs,omitempty"` MatchingType string `json:"matching_type,omitempty"` Rules []StreamRule `json:"rules,omitempty"` AlertConditions []AlertCondition `json:"alert_conditions,omitempty"` AlertReceivers *AlertReceivers `json:"alert_receivers,omitempty"` RemoveMatchesFromDefaultStream *bool `json:"remove_matches_from_default_stream,omitempty"` }
StreamUpdateParams represents a steram update params.
type StreamsBody ¶
type StreamsBody struct { Total int `json:"total,omitempty"` Streams []Stream `json:"streams,omitempty"` }
StreamsBody represents Get Streams API's response body. Basically users don't use this struct, but this struct is public because some sub packages use this struct.
type User ¶
type User struct { // a unique user name used to log in with. // ex. "local:admin" Username string `json:"username,omitempty" v-create:"required" v-update:"required"` // the contact email address Email string `json:"email,omitempty" v-create:"required"` // a descriptive name for this account, e.g. the full name. FullName string `json:"full_name,omitempty" v-create:"required"` Password string `json:"password,omitempty" v-create:"required"` ID string `json:"id,omitempty"` // the timezone to use to display times, or leave it as it is to use the system's default. // ex. "UTC" Timezone string `json:"timezone,omitempty"` // ex. "2018-03-02T06:32:01.841+0000" LastActivity string `json:"last_activity,omitempty"` // ex. "192.168.192.1" ClientAddress string `json:"client_address,omitempty"` // Session automatically end after this amount of time, unless they are actively used. // ex. 28800000 SessionTimeoutMs int `json:"session_timeout_ms,omitempty"` External bool `json:"external,omitempty"` ReadOnly bool `json:"read_only,omitempty"` SessionActive bool `json:"session_active,omitempty"` Preferences *Preferences `json:"preferences,omitempty"` Startpage *Startpage `json:"startpage,omitempty"` // Assign the relevant roles to this user to grant them access to the relevant streams and dashboards. // The Reader role grants basic access to the system and will be enabled. // The Admin role grants access to everything in Graylog. // ex. ["Admin"] Roles set.StrSet `json:"roles,omitempty"` Permissions set.StrSet `json:"permissions,omitempty" v-create:"required"` }
User represents a user.
func (*User) NewUpdateParams ¶
func (user *User) NewUpdateParams() *UserUpdateParams
NewUpdateParams returns Update User API's parameters.
func (*User) SetDefaultValues ¶
func (user *User) SetDefaultValues()
SetDefaultValues sets default values.
type UserUpdateParams ¶
type UserUpdateParams struct { Username string `json:"username,omitempty" v-update:"required"` Email *string `json:"email,omitempty"` FullName *string `json:"full_name,omitempty"` Password *string `json:"password,omitempty"` Timezone *string `json:"timezone,omitempty"` SessionTimeoutMs *int `json:"session_timeout_ms,omitempty"` Permissions set.StrSet `json:"permissions,omitempty"` Startpage *Startpage `json:"startpage,omitempty"` Roles set.StrSet `json:"roles,omitempty"` }
UserUpdateParams represents a user update API's parameter.
Source Files ¶
- doc.go
- index_set.go
- index_set_stats.go
- input.go
- input_attrs.go
- input_aws_flow_logs.go
- input_aws_logs.go
- input_beats.go
- input_cef_amqp.go
- input_cef_kafka.go
- input_cef_tcp.go
- input_cef_udp.go
- input_cloud_trail.go
- input_data.go
- input_fake_http_message.go
- input_gelf_amqp.go
- input_gelf_http.go
- input_gelf_kafka.go
- input_gelf_tcp.go
- input_gelf_udp.go
- input_json_path.go
- input_net_flow_udp.go
- input_raw_amqp.go
- input_syslog_amqp.go
- input_syslog_kafka.go
- input_syslog_tcp.go
- input_syslog_udp.go
- input_unknown_attrs.go
- role.go
- stream.go
- stream_rule.go
- user.go
Directories ¶
Path | Synopsis |
---|---|
Package client provides Graylog API client.
|
Package client provides Graylog API client. |
endpoint
Package endpoint provides Graylog API endpoints.
|
Package endpoint provides Graylog API endpoints. |
Package mockserver provides Graylog API mock server.
|
Package mockserver provides Graylog API mock server. |
exec
Run Graylog mock server.
|
Run Graylog mock server. |
handler
Package handler provides handlers of Graylog API mock server.
|
Package handler provides handlers of Graylog API mock server. |
logic
Package logic provides logic layers of Graylog API mock server.
|
Package logic provides logic layers of Graylog API mock server. |
store
Package store provides store interface for Graylog API mock server.
|
Package store provides store interface for Graylog API mock server. |
store/plain
Package plain provides the implementation of store.Store interface.
|
Package plain provides the implementation of store.Store interface. |
graylog
Package graylog provides the terraform provider for Graylog.
|
Package graylog provides the terraform provider for Graylog. |
Package testutil provides utilities for test.
|
Package testutil provides utilities for test. |
Package validator provides validators for graylog's create and update APIs.
|
Package validator provides validators for graylog's create and update APIs. |