Documentation ¶
Overview ¶
Package plain provides the implementation of store.Store interface.
Index ¶
- func NewStore(dataPath string) store.Store
- type Store
- func (store *Store) AddCollectorConfiguration(cfg *graylog.CollectorConfiguration) error
- func (store *Store) AddCollectorConfigurationInput(cfgID string, input *graylog.CollectorConfigurationInput) error
- func (store *Store) AddCollectorConfigurationOutput(cfgID string, output *graylog.CollectorConfigurationOutput) error
- func (store *Store) AddCollectorConfigurationSnippet(cfgID string, snippet *graylog.CollectorConfigurationSnippet) error
- func (store *Store) AddDashboard(dashboard *graylog.Dashboard) error
- func (store *Store) AddIndexSet(is *graylog.IndexSet) error
- func (store *Store) AddInput(input *graylog.Input) error
- func (store *Store) AddRole(role *graylog.Role) error
- func (store *Store) AddStream(stream *graylog.Stream) error
- func (store *Store) AddStreamRule(rule *graylog.StreamRule) error
- func (store *Store) AddUser(user *graylog.User) error
- func (store *Store) Authorize(user *graylog.User, scope string, args ...string) (bool, error)
- func (store *Store) DeleteCollectorConfiguration(id string) error
- func (store *Store) DeleteCollectorConfigurationInput(cfgID, inputID string) error
- func (store *Store) DeleteCollectorConfigurationOutput(cfgID, outputID string) error
- func (store *Store) DeleteCollectorConfigurationSnippet(cfgID, snippetID string) error
- func (store *Store) DeleteDashboard(id string) error
- func (store *Store) DeleteIndexSet(id string) error
- func (store *Store) DeleteInput(id string) error
- func (store *Store) DeleteLDAPSetting() error
- func (store *Store) DeleteRole(name string) error
- func (store *Store) DeleteStream(id string) error
- func (store *Store) DeleteStreamRule(streamID, streamRuleID string) error
- func (store *Store) DeleteUser(name string) error
- func (store *Store) GetAlarmCallbacks() ([]graylog.AlarmCallback, int, error)
- func (store *Store) GetAlert(id string) (*graylog.Alert, error)
- func (store *Store) GetAlertConditions() ([]graylog.AlertCondition, int, error)
- func (store *Store) GetAlerts(since, limit int) ([]graylog.Alert, int, error)
- func (store *Store) GetCollectorConfiguration(id string) (*graylog.CollectorConfiguration, error)
- func (store *Store) GetCollectorConfigurations() ([]graylog.CollectorConfiguration, int, error)
- func (store *Store) GetDashboard(id string) (*graylog.Dashboard, error)
- func (store *Store) GetDashboards() ([]graylog.Dashboard, int, error)
- func (store *Store) GetDefaultIndexSetID() (string, error)
- func (store *Store) GetEnabledStreams() ([]graylog.Stream, int, error)
- func (store *Store) GetIndexSet(id string) (*graylog.IndexSet, error)
- func (store *Store) GetIndexSetStats(id string) (*graylog.IndexSetStats, error)
- func (store *Store) GetIndexSetStatsMap() (map[string]graylog.IndexSetStats, error)
- func (store *Store) GetIndexSets(skip, limit int) ([]graylog.IndexSet, int, error)
- func (store *Store) GetInput(id string) (*graylog.Input, error)
- func (store *Store) GetInputs() ([]graylog.Input, int, error)
- func (store *Store) GetLDAPSetting() (*graylog.LDAPSetting, error)
- func (store *Store) GetRole(name string) (*graylog.Role, error)
- func (store *Store) GetRoles() ([]graylog.Role, int, error)
- func (store *Store) GetStream(id string) (*graylog.Stream, error)
- func (store *Store) GetStreamRule(streamID, streamRuleID string) (*graylog.StreamRule, error)
- func (store *Store) GetStreamRules(id string) ([]graylog.StreamRule, int, error)
- func (store *Store) GetStreams() ([]graylog.Stream, int, error)
- func (store *Store) GetTotalIndexSetStats() (*graylog.IndexSetStats, error)
- func (store *Store) GetUser(username string) (*graylog.User, error)
- func (store *Store) GetUserByAccessToken(token string) (*graylog.User, error)
- func (store *Store) GetUsers() ([]graylog.User, error)
- func (store *Store) HasAlert(id string) (bool, error)
- func (store *Store) HasCollectorConfiguration(id string) (bool, error)
- func (store *Store) HasCollectorConfigurationInput(cfgID, inputID string) (bool, error)
- func (store *Store) HasCollectorConfigurationOutput(cfgID, outputID string) (bool, error)
- func (store *Store) HasCollectorConfigurationSnippet(cfgID, snippetID string) (bool, error)
- func (store *Store) HasDashboard(id string) (bool, error)
- func (store *Store) HasIndexSet(id string) (bool, error)
- func (store *Store) HasInput(id string) (bool, error)
- func (store *Store) HasRole(name string) (bool, error)
- func (store *Store) HasStream(id string) (bool, error)
- func (store *Store) HasStreamRule(streamID, streamRuleID string) (bool, error)
- func (store *Store) HasUser(username string) (bool, error)
- func (store *Store) IsConflictIndexPrefix(id, prefix string) (bool, error)
- func (store *Store) Load() error
- func (store *Store) MarshalJSON() ([]byte, error)
- func (store *Store) RenameCollectorConfiguration(id, name string) (*graylog.CollectorConfiguration, error)
- func (store *Store) Save() error
- func (store *Store) SetDefaultIndexSetID(id string) error
- func (store *Store) UnmarshalJSON(b []byte) error
- func (store *Store) UpdateCollectorConfigurationInput(cfgID, inputID string, input *graylog.CollectorConfigurationInput) error
- func (store *Store) UpdateCollectorConfigurationOutput(cfgID, outputID string, output *graylog.CollectorConfigurationOutput) error
- func (store *Store) UpdateCollectorConfigurationSnippet(cfgID, snippetID string, snippet *graylog.CollectorConfigurationSnippet) error
- func (store *Store) UpdateDashboard(dashboard *graylog.Dashboard) error
- func (store *Store) UpdateIndexSet(prms *graylog.IndexSetUpdateParams) (*graylog.IndexSet, error)
- func (store *Store) UpdateInput(prms *graylog.InputUpdateParams) (*graylog.Input, error)
- func (store *Store) UpdateLDAPSetting(prms *graylog.LDAPSettingUpdateParams) error
- func (store *Store) UpdateRole(name string, prms *graylog.RoleUpdateParams) (*graylog.Role, error)
- func (store *Store) UpdateStream(prms *graylog.StreamUpdateParams) (*graylog.Stream, error)
- func (store *Store) UpdateStreamRule(prms *graylog.StreamRuleUpdateParams) error
- func (store *Store) UpdateUser(prms *graylog.UserUpdateParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the implementation of the Store interface with pure golang.
func (*Store) AddCollectorConfiguration ¶ added in v0.7.0
AddCollectorConfiguration adds a collector configuration to the store.
func (*Store) AddCollectorConfigurationInput ¶ added in v0.7.0
func (store *Store) AddCollectorConfigurationInput(cfgID string, input *graylog.CollectorConfigurationInput) error
AddCollectorConfigurationInput adds a collector configuration input to the store.
func (*Store) AddCollectorConfigurationOutput ¶ added in v0.7.0
func (store *Store) AddCollectorConfigurationOutput(cfgID string, output *graylog.CollectorConfigurationOutput) error
AddCollectorConfigurationOutput adds a collector configuration output to the store.
func (*Store) AddCollectorConfigurationSnippet ¶ added in v0.7.0
func (store *Store) AddCollectorConfigurationSnippet(cfgID string, snippet *graylog.CollectorConfigurationSnippet) error
AddCollectorConfigurationSnippet adds a collector configuration snippet to the store.
func (*Store) AddDashboard ¶ added in v0.4.0
AddDashboard adds an dashboard to the store.
func (*Store) AddIndexSet ¶
AddIndexSet adds an index set to the store.
func (*Store) AddStreamRule ¶
AddStreamRule adds a stream rule.
func (*Store) DeleteCollectorConfiguration ¶ added in v0.7.0
DeleteCollectorConfiguration deletes a collector configuration from the store.
func (*Store) DeleteCollectorConfigurationInput ¶ added in v0.7.0
DeleteCollectorConfigurationInput deletes a collector configuration input from the store.
func (*Store) DeleteCollectorConfigurationOutput ¶ added in v0.7.0
DeleteCollectorConfigurationOutput deletes a collector configuration output from the store.
func (*Store) DeleteCollectorConfigurationSnippet ¶ added in v0.7.0
DeleteCollectorConfigurationSnippet deletes a collector configuration snippet from the store.
func (*Store) DeleteDashboard ¶ added in v0.4.0
DeleteDashboard deletes an dashboard from the store.
func (*Store) DeleteIndexSet ¶
DeleteIndexSet removes a index set from the Mock Server.
func (*Store) DeleteInput ¶
DeleteInput deletes an input from the store.
func (*Store) DeleteLDAPSetting ¶ added in v0.6.0
DeleteLDAPSetting deletes a LDAP Setting from store.
func (*Store) DeleteRole ¶
DeleteRole deletes a role from store.
func (*Store) DeleteStream ¶
DeleteStream removes a stream from the store.
func (*Store) DeleteStreamRule ¶
DeleteStreamRule deletes a stream rule.
func (*Store) DeleteUser ¶
DeleteUser removes a user from the Store.
func (*Store) GetAlarmCallbacks ¶ added in v0.5.0
GetAlarmCallbacks returns alarm callbacks.
func (*Store) GetAlertConditions ¶ added in v0.2.0
GetAlertConditions returns Alert Conditions.
func (*Store) GetCollectorConfiguration ¶ added in v0.7.0
GetCollectorConfiguration returns an input.
func (*Store) GetCollectorConfigurations ¶ added in v0.7.0
GetCollectorConfigurations returns all collector configurations.
func (*Store) GetDashboard ¶ added in v0.4.0
GetDashboard returns an dashboard.
func (*Store) GetDashboards ¶ added in v0.4.0
GetDashboards returns dashboards.
func (*Store) GetDefaultIndexSetID ¶
GetDefaultIndexSetID returns a default index set id.
func (*Store) GetEnabledStreams ¶
GetEnabledStreams returns all enabled streams.
func (*Store) GetIndexSet ¶
GetIndexSet returns an index set.
func (*Store) GetIndexSetStats ¶
GetIndexSetStats returns an index set stats.
func (*Store) GetIndexSetStatsMap ¶
GetIndexSetStatsMap returns all of index set stats.
func (*Store) GetIndexSets ¶
GetIndexSets returns a list of all index sets.
func (*Store) GetLDAPSetting ¶ added in v0.6.0
GetLDAPSetting returns a LDAP Setting.
func (*Store) GetRole ¶
GetRole returns a Role. If no role with given name is found, returns nil and not returns an error.
func (*Store) GetStreamRule ¶
GetStreamRule returns a stream rule.
func (*Store) GetStreamRules ¶
GetStreamRules returns stream rules of the given stream.
func (*Store) GetStreams ¶
GetStreams returns a list of all streams.
func (*Store) GetTotalIndexSetStats ¶
GetTotalIndexSetStats returns all index set's statistics.
func (*Store) GetUser ¶
GetUser returns a user. If the user is not found, this method returns nil and doesn't raise an error.
func (*Store) GetUserByAccessToken ¶
GetUserByAccessToken returns a user name. If the user is not found, this method returns nil and doesn't raise an error.
func (*Store) HasCollectorConfiguration ¶ added in v0.7.0
HasCollectorConfiguration returns whether the collector configuration exists.
func (*Store) HasCollectorConfigurationInput ¶ added in v0.7.0
HasCollectorConfigurationInput returns whether the collector configuration input exists.
func (*Store) HasCollectorConfigurationOutput ¶ added in v0.7.0
HasCollectorConfigurationOutput returns whether the collector configuration output exists.
func (*Store) HasCollectorConfigurationSnippet ¶ added in v0.7.0
HasCollectorConfigurationSnippet returns whether the collector configuration snippet exists.
func (*Store) HasDashboard ¶ added in v0.4.0
HasDashboard returns whether the dashboard exists.
func (*Store) HasIndexSet ¶
HasIndexSet returns whether the index set exists.
func (*Store) HasStreamRule ¶
HasStreamRule returns whether the stream rule exists.
func (*Store) IsConflictIndexPrefix ¶
IsConflictIndexPrefix returns true if indexPrefix would conflict with an existing index set.
func (*Store) MarshalJSON ¶
MarshalJSON is the implementation of the json.Marshaler interface.
func (*Store) RenameCollectorConfiguration ¶ added in v0.7.0
func (store *Store) RenameCollectorConfiguration(id, name string) (*graylog.CollectorConfiguration, error)
RenameCollectorConfiguration renames a collector configuration.
func (*Store) SetDefaultIndexSetID ¶
SetDefaultIndexSetID sets a default index set id.
func (*Store) UnmarshalJSON ¶
UnmarshalJSON is the implementation of the json.Unmarshaler interface.
func (*Store) UpdateCollectorConfigurationInput ¶ added in v0.7.0
func (store *Store) UpdateCollectorConfigurationInput(cfgID, inputID string, input *graylog.CollectorConfigurationInput) error
UpdateCollectorConfigurationInput updates a collector configuration input.
func (*Store) UpdateCollectorConfigurationOutput ¶ added in v0.7.0
func (store *Store) UpdateCollectorConfigurationOutput(cfgID, outputID string, output *graylog.CollectorConfigurationOutput) error
UpdateCollectorConfigurationOutput updates a collector configuration output.
func (*Store) UpdateCollectorConfigurationSnippet ¶ added in v0.7.0
func (store *Store) UpdateCollectorConfigurationSnippet(cfgID, snippetID string, snippet *graylog.CollectorConfigurationSnippet) error
UpdateCollectorConfigurationSnippet updates a collector configuration snippet.
func (*Store) UpdateDashboard ¶ added in v0.4.0
UpdateDashboard updates an dashboard at the Store. Allowed: title, description
func (*Store) UpdateIndexSet ¶
UpdateIndexSet updates an index set at the Mock Server.
func (*Store) UpdateInput ¶
UpdateInput updates an input at the Store. Required: Title, Type, Attrs Allowed: Global, Node
func (*Store) UpdateLDAPSetting ¶ added in v0.6.0
UpdateLDAPSetting updates a LDAP Setting at the store.
func (*Store) UpdateRole ¶
UpdateRole updates a role at the store.
func (*Store) UpdateStream ¶
UpdateStream updates a stream at the store.
func (*Store) UpdateStreamRule ¶
UpdateStreamRule updates a stream rule.
func (*Store) UpdateUser ¶
UpdateUser updates a user of the Store. "email", "permissions", "full_name", "password"
Source Files ¶
- alarm_callback.go
- alert.go
- alert_condition.go
- collector_configuration.go
- collector_configuration_input.go
- collector_configuration_output.go
- collector_configuration_snippet.go
- dashboard.go
- doc.go
- index_set.go
- index_set_stats.go
- input.go
- ldap_setting.go
- role.go
- store.go
- stream.go
- stream_rule.go
- user.go