Documentation ¶
Overview ¶
Package plain provides the implementation of store.Store interface.
Index ¶
- func NewStore(dataPath string) store.Store
- type Store
- 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) 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) 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) 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) Save() error
- func (store *Store) SetDefaultIndexSetID(id string) error
- func (store *Store) UnmarshalJSON(b []byte) 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) 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) 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) 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) 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) SetDefaultIndexSetID ¶
SetDefaultIndexSetID sets a default index set id.
func (*Store) UnmarshalJSON ¶
UnmarshalJSON is the implementation of the json.Unmarshaler interface.
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"