Documentation ¶
Overview ¶
Package client provides Graylog API client.
Index ¶
- type Client
- func (client *Client) AddUserToRole(userName, roleName string) (*ErrorInfo, error)
- func (client *Client) AddUserToRoleContext(ctx context.Context, userName, roleName string) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfiguration(cfg *graylog.CollectorConfiguration) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationContext(ctx context.Context, cfg *graylog.CollectorConfiguration) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationInput(id string, input *graylog.CollectorConfigurationInput) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationInputContext(ctx context.Context, id string, input *graylog.CollectorConfigurationInput) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationOutput(id string, output *graylog.CollectorConfigurationOutput) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationOutputContext(ctx context.Context, id string, output *graylog.CollectorConfigurationOutput) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationSnippet(id string, snippet *graylog.CollectorConfigurationSnippet) (*ErrorInfo, error)
- func (client *Client) CreateCollectorConfigurationSnippetContext(ctx context.Context, id string, snippet *graylog.CollectorConfigurationSnippet) (*ErrorInfo, error)
- func (client *Client) CreateDashboard(dashboard *graylog.Dashboard) (*ErrorInfo, error)
- func (client *Client) CreateDashboardContext(ctx context.Context, dashboard *graylog.Dashboard) (*ErrorInfo, error)
- func (client *Client) CreateDashboardWidget(dashboardID string, widget graylog.Widget) (graylog.Widget, *ErrorInfo, error)
- func (client *Client) CreateDashboardWidgetContext(ctx context.Context, dashboardID string, widget graylog.Widget) (graylog.Widget, *ErrorInfo, error)
- func (client *Client) CreateIndexSet(indexSet *graylog.IndexSet) (*ErrorInfo, error)
- func (client *Client) CreateIndexSetContext(ctx context.Context, is *graylog.IndexSet) (*ErrorInfo, error)
- func (client *Client) CreateInput(input *graylog.Input) (ei *ErrorInfo, err error)
- func (client *Client) CreateInputContext(ctx context.Context, input *graylog.Input) (ei *ErrorInfo, err error)
- func (client *Client) CreatePipelineRule(rule *graylog.PipelineRule) (*ErrorInfo, error)
- func (client *Client) CreatePipelineRuleContext(ctx context.Context, rule *graylog.PipelineRule) (*ErrorInfo, error)
- func (client *Client) CreateRole(role *graylog.Role) (*ErrorInfo, error)
- func (client *Client) CreateRoleContext(ctx context.Context, role *graylog.Role) (*ErrorInfo, error)
- func (client *Client) CreateStream(stream *graylog.Stream) (*ErrorInfo, error)
- func (client *Client) CreateStreamAlarmCallback(ac *graylog.AlarmCallback) (*ErrorInfo, error)
- func (client *Client) CreateStreamAlarmCallbackContext(ctx context.Context, ac *graylog.AlarmCallback) (*ErrorInfo, error)
- func (client *Client) CreateStreamAlertCondition(streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
- func (client *Client) CreateStreamAlertConditionContext(ctx context.Context, streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
- func (client *Client) CreateStreamContext(ctx context.Context, stream *graylog.Stream) (*ErrorInfo, error)
- func (client *Client) CreateStreamRule(rule *graylog.StreamRule) (*ErrorInfo, error)
- func (client *Client) CreateStreamRuleContext(ctx context.Context, rule *graylog.StreamRule) (*ErrorInfo, error)
- func (client *Client) CreateUser(user *graylog.User) (*ErrorInfo, error)
- func (client *Client) CreateUserContext(ctx context.Context, user *graylog.User) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfiguration(id string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationInput(id, inputID string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationInputContext(ctx context.Context, id, inputID string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationOutput(id, outputID string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationOutputContext(ctx context.Context, id, outputID string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationSnippet(id, snippetID string) (*ErrorInfo, error)
- func (client *Client) DeleteCollectorConfigurationSnippetContext(ctx context.Context, id, snippetID string) (*ErrorInfo, error)
- func (client *Client) DeleteDashboard(id string) (*ErrorInfo, error)
- func (client *Client) DeleteDashboardContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteDashboardWidget(dashboardID, widgetID string) (*ErrorInfo, error)
- func (client *Client) DeleteDashboardWidgetContext(ctx context.Context, dashboardID, widgetID string) (*ErrorInfo, error)
- func (client *Client) DeleteIndexSet(id string) (*ErrorInfo, error)
- func (client *Client) DeleteIndexSetContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteInput(id string) (*ErrorInfo, error)
- func (client *Client) DeleteInputContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteLDAPSetting() (*ErrorInfo, error)
- func (client *Client) DeleteLDAPSettingContext(ctx context.Context) (*ErrorInfo, error)
- func (client *Client) DeletePipelineRule(id string) (*ErrorInfo, error)
- func (client *Client) DeletePipelineRuleContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteRole(name string) (*ErrorInfo, error)
- func (client *Client) DeleteRoleContext(ctx context.Context, name string) (*ErrorInfo, error)
- func (client *Client) DeleteStream(id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamAlarmCallback(streamID, id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamAlarmCallbackContext(ctx context.Context, streamID, id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamAlertCondition(streamID, id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamAlertConditionContext(ctx context.Context, streamID, id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamRule(streamID, ruleID string) (*ErrorInfo, error)
- func (client *Client) DeleteStreamRuleContext(ctx context.Context, streamID, ruleID string) (*ErrorInfo, error)
- func (client *Client) DeleteUser(name string) (*ErrorInfo, error)
- func (client *Client) DeleteUserContext(ctx context.Context, name string) (*ErrorInfo, error)
- func (client *Client) Endpoints() *endpoint.Endpoints
- func (client *Client) GetAlarmCallbacks() ([]graylog.AlarmCallback, int, *ErrorInfo, error)
- func (client *Client) GetAlarmCallbacksContext(ctx context.Context) ([]graylog.AlarmCallback, int, *ErrorInfo, error)
- func (client *Client) GetAlert(id string) (*graylog.Alert, *ErrorInfo, error)
- func (client *Client) GetAlertConditions() ([]graylog.AlertCondition, int, *ErrorInfo, error)
- func (client *Client) GetAlertConditionsContext(ctx context.Context) ([]graylog.AlertCondition, int, *ErrorInfo, error)
- func (client *Client) GetAlertContext(ctx context.Context, id string) (*graylog.Alert, *ErrorInfo, error)
- func (client *Client) GetAlerts(skip, limit int) ([]graylog.Alert, int, *ErrorInfo, error)
- func (client *Client) GetAlertsContext(ctx context.Context, skip, limit int) ([]graylog.Alert, int, *ErrorInfo, error)
- func (client *Client) GetCollectorConfiguration(id string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
- func (client *Client) GetCollectorConfigurationContext(ctx context.Context, id string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
- func (client *Client) GetCollectorConfigurations() ([]graylog.CollectorConfiguration, int, *ErrorInfo, error)
- func (client *Client) GetCollectorConfigurationsContext(ctx context.Context) ([]graylog.CollectorConfiguration, int, *ErrorInfo, error)
- func (client *Client) GetDashboard(id string) (*graylog.Dashboard, *ErrorInfo, error)
- func (client *Client) GetDashboardContext(ctx context.Context, id string) (*graylog.Dashboard, *ErrorInfo, error)
- func (client *Client) GetDashboardWidget(dashboardID, widgetID string) (graylog.Widget, *ErrorInfo, error)
- func (client *Client) GetDashboardWidgetContext(ctx context.Context, dashboardID, widgetID string) (graylog.Widget, *ErrorInfo, error)
- func (client *Client) GetDashboards() ([]graylog.Dashboard, int, *ErrorInfo, error)
- func (client *Client) GetDashboardsContext(ctx context.Context) ([]graylog.Dashboard, int, *ErrorInfo, error)
- func (client *Client) GetEnabledStreams() (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
- func (client *Client) GetEnabledStreamsContext(ctx context.Context) (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
- func (client *Client) GetIndexSet(id string) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) GetIndexSetContext(ctx context.Context, id string) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) GetIndexSetStats(id string) (*graylog.IndexSetStats, *ErrorInfo, error)
- func (client *Client) GetIndexSetStatsContext(ctx context.Context, id string) (*graylog.IndexSetStats, *ErrorInfo, error)
- func (client *Client) GetIndexSets(skip, limit int, stats bool) ([]graylog.IndexSet, map[string]graylog.IndexSetStats, int, *ErrorInfo, error)
- func (client *Client) GetIndexSetsContext(ctx context.Context, skip, limit int, stats bool) ([]graylog.IndexSet, map[string]graylog.IndexSetStats, int, *ErrorInfo, error)
- func (client *Client) GetInput(id string) (*graylog.Input, *ErrorInfo, error)
- func (client *Client) GetInputContext(ctx context.Context, id string) (*graylog.Input, *ErrorInfo, error)
- func (client *Client) GetInputs() ([]graylog.Input, int, *ErrorInfo, error)
- func (client *Client) GetInputsContext(ctx context.Context) ([]graylog.Input, int, *ErrorInfo, error)
- func (client *Client) GetLDAPGroupRoleMapping() (map[string]string, *ErrorInfo, error)
- func (client *Client) GetLDAPGroupRoleMappingContext(ctx context.Context) (map[string]string, *ErrorInfo, error)
- func (client *Client) GetLDAPGroups() ([]string, *ErrorInfo, error)
- func (client *Client) GetLDAPGroupsContext(ctx context.Context) ([]string, *ErrorInfo, error)
- func (client *Client) GetLDAPSetting() (*graylog.LDAPSetting, *ErrorInfo, error)
- func (client *Client) GetLDAPSettingContext(ctx context.Context) (*graylog.LDAPSetting, *ErrorInfo, error)
- func (client *Client) GetPipelineRule(id string) (*graylog.PipelineRule, *ErrorInfo, error)
- func (client *Client) GetPipelineRuleContext(ctx context.Context, id string) (*graylog.PipelineRule, *ErrorInfo, error)
- func (client *Client) GetPipelineRules() ([]graylog.PipelineRule, *ErrorInfo, error)
- func (client *Client) GetPipelineRulesContext(ctx context.Context) ([]graylog.PipelineRule, *ErrorInfo, error)
- func (client *Client) GetRole(name string) (*graylog.Role, *ErrorInfo, error)
- func (client *Client) GetRoleContext(ctx context.Context, name string) (*graylog.Role, *ErrorInfo, error)
- func (client *Client) GetRoleMembers(name string) ([]graylog.User, *ErrorInfo, error)
- func (client *Client) GetRoleMembersContext(ctx context.Context, name string) ([]graylog.User, *ErrorInfo, error)
- func (client *Client) GetRoles() ([]graylog.Role, int, *ErrorInfo, error)
- func (client *Client) GetRolesContext(ctx context.Context) ([]graylog.Role, int, *ErrorInfo, error)
- func (client *Client) GetStream(id string) (*graylog.Stream, *ErrorInfo, error)
- func (client *Client) GetStreamAlarmCallback(streamID, id string) (graylog.AlarmCallback, *ErrorInfo, error)
- func (client *Client) GetStreamAlarmCallbackContext(ctx context.Context, streamID, id string) (graylog.AlarmCallback, *ErrorInfo, error)
- func (client *Client) GetStreamAlarmCallbacks(streamID string) (acs []graylog.AlarmCallback, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamAlarmCallbacksContext(ctx context.Context, streamID string) (acs []graylog.AlarmCallback, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamAlertCondition(streamID, id string) (graylog.AlertCondition, *ErrorInfo, error)
- func (client *Client) GetStreamAlertConditionContext(ctx context.Context, streamID, id string) (graylog.AlertCondition, *ErrorInfo, error)
- func (client *Client) GetStreamAlertConditions(streamID string) (conds []graylog.AlertCondition, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamAlertConditionsContext(ctx context.Context, streamID string) (conds []graylog.AlertCondition, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamContext(ctx context.Context, id string) (*graylog.Stream, *ErrorInfo, error)
- func (client *Client) GetStreamRule(streamID, ruleID string) (*graylog.StreamRule, *ErrorInfo, error)
- func (client *Client) GetStreamRuleContext(ctx context.Context, streamID, ruleID string) (*graylog.StreamRule, *ErrorInfo, error)
- func (client *Client) GetStreamRules(streamID string) (streamRules []graylog.StreamRule, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamRulesContext(ctx context.Context, streamID string) (streamRules []graylog.StreamRule, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreams() (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
- func (client *Client) GetStreamsContext(ctx context.Context) (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
- func (client *Client) GetTotalIndexSetsStats() (*graylog.IndexSetStats, *ErrorInfo, error)
- func (client *Client) GetTotalIndexSetsStatsContext(ctx context.Context) (*graylog.IndexSetStats, *ErrorInfo, error)
- func (client *Client) GetUser(name string) (*graylog.User, *ErrorInfo, error)
- func (client *Client) GetUserContext(ctx context.Context, name string) (*graylog.User, *ErrorInfo, error)
- func (client *Client) GetUsers() ([]graylog.User, *ErrorInfo, error)
- func (client *Client) GetUsersContext(ctx context.Context) ([]graylog.User, *ErrorInfo, error)
- func (client *Client) Name() string
- func (client *Client) Password() string
- func (client *Client) PauseStream(id string) (*ErrorInfo, error)
- func (client *Client) PauseStreamContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) RemoveUserFromRole(userName, roleName string) (*ErrorInfo, error)
- func (client *Client) RemoveUserFromRoleContext(ctx context.Context, userName, roleName string) (*ErrorInfo, error)
- func (client *Client) RenameCollectorConfiguration(id, name string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
- func (client *Client) RenameCollectorConfigurationContext(ctx context.Context, id, name string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
- func (client *Client) ResumeStream(id string) (*ErrorInfo, error)
- func (client *Client) ResumeStreamContext(ctx context.Context, id string) (*ErrorInfo, error)
- func (client *Client) SetDefaultIndexSet(id string) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) SetDefaultIndexSetContext(ctx context.Context, id string) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) SetXRequestedBy(x string)
- func (client *Client) UpdateCollectorConfigurationInput(id, inputID string, input *graylog.CollectorConfigurationInput) (*ErrorInfo, error)
- func (client *Client) UpdateCollectorConfigurationInputContext(ctx context.Context, id, inputID string, ...) (*ErrorInfo, error)
- func (client *Client) UpdateCollectorConfigurationOutput(id, outputID string, output *graylog.CollectorConfigurationOutput) (*ErrorInfo, error)
- func (client *Client) UpdateCollectorConfigurationOutputContext(ctx context.Context, id, outputID string, ...) (*ErrorInfo, error)
- func (client *Client) UpdateCollectorConfigurationSnippet(id, snippetID string, snippet *graylog.CollectorConfigurationSnippet) (*ErrorInfo, error)
- func (client *Client) UpdateCollectorConfigurationSnippetContext(ctx context.Context, id, snippetID string, ...) (*ErrorInfo, error)
- func (client *Client) UpdateDashboard(prms *graylog.Dashboard) (*ErrorInfo, error)
- func (client *Client) UpdateDashboardContext(ctx context.Context, dashboard *graylog.Dashboard) (*ErrorInfo, error)
- func (client *Client) UpdateIndexSet(is *graylog.IndexSetUpdateParams) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) UpdateIndexSetContext(ctx context.Context, prms *graylog.IndexSetUpdateParams) (*graylog.IndexSet, *ErrorInfo, error)
- func (client *Client) UpdateInput(input *graylog.InputUpdateParams) (*graylog.Input, *ErrorInfo, error)
- func (client *Client) UpdateInputContext(ctx context.Context, prms *graylog.InputUpdateParams) (*graylog.Input, *ErrorInfo, error)
- func (client *Client) UpdateLDAPGroupRoleMapping(mapping map[string]string) (*ErrorInfo, error)
- func (client *Client) UpdateLDAPGroupRoleMappingContext(ctx context.Context, mapping map[string]string) (*ErrorInfo, error)
- func (client *Client) UpdateLDAPSetting(ldapSetting *graylog.LDAPSetting) (*ErrorInfo, error)
- func (client *Client) UpdateLDAPSettingContext(ctx context.Context, prms *graylog.LDAPSetting) (*ErrorInfo, error)
- func (client *Client) UpdatePipelineRule(rule *graylog.PipelineRule) (*ErrorInfo, error)
- func (client *Client) UpdatePipelineRuleContext(ctx context.Context, rule *graylog.PipelineRule) (*ErrorInfo, error)
- func (client *Client) UpdateRole(name string, role *graylog.RoleUpdateParams) (*graylog.Role, *ErrorInfo, error)
- func (client *Client) UpdateRoleContext(ctx context.Context, name string, prms *graylog.RoleUpdateParams) (*graylog.Role, *ErrorInfo, error)
- func (client *Client) UpdateStream(stream *graylog.Stream) (*ErrorInfo, error)
- func (client *Client) UpdateStreamAlarmCallback(ac *graylog.AlarmCallback) (*ErrorInfo, error)
- func (client *Client) UpdateStreamAlarmCallbackContext(ctx context.Context, ac *graylog.AlarmCallback) (*ErrorInfo, error)
- func (client *Client) UpdateStreamAlertCondition(streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
- func (client *Client) UpdateStreamAlertConditionContext(ctx context.Context, streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
- func (client *Client) UpdateStreamContext(ctx context.Context, stream *graylog.Stream) (*ErrorInfo, error)
- func (client *Client) UpdateStreamRule(rule *graylog.StreamRule) (*ErrorInfo, error)
- func (client *Client) UpdateStreamRuleContext(ctx context.Context, rule *graylog.StreamRule) (*ErrorInfo, error)
- func (client *Client) UpdateUser(prms *graylog.UserUpdateParams) (*ErrorInfo, error)
- func (client *Client) UpdateUserContext(ctx context.Context, prms *graylog.UserUpdateParams) (*ErrorInfo, error)
- type ErrorInfo
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Graylog API client.
Example ¶
package main import ( "fmt" "log" "github.com/suzuki-shunsuke/go-graylog/client" "github.com/suzuki-shunsuke/go-graylog/mockserver" ) func main() { // Create a mock server server, err := mockserver.NewServer("", nil) if err != nil { log.Fatal(err) } // Start a server server.Start() defer server.Close() // Create a client cl, err := client.NewClient(server.Endpoint(), "admin", "admin") if err != nil { log.Fatal(err) } // get a role "Admin" // ei.Response.Body is closed role, ei, err := cl.GetRole("Admin") if err != nil { log.Fatal(err) } fmt.Println(ei.Response.StatusCode) fmt.Println(role.Name) }
Output: 200 Admin
func NewClient ¶
NewClient returns a new Graylog API Client. ep is API endpoint url (ex. http://localhost:9000/api). name and password are authentication name and password. If you use an access token instead of password, name is access token and password is literal password "token". If you use a session token instead of password, name is session token and password is literal password "session".
func (*Client) AddUserToRole ¶
AddUserToRole adds a user to a role.
func (*Client) AddUserToRoleContext ¶
func (client *Client) AddUserToRoleContext( ctx context.Context, userName, roleName string, ) (*ErrorInfo, error)
AddUserToRoleContext adds a user to a role with a context.
func (*Client) CreateCollectorConfiguration ¶ added in v0.7.0
func (client *Client) CreateCollectorConfiguration(cfg *graylog.CollectorConfiguration) (*ErrorInfo, error)
CreateCollectorConfiguration creates a collector configuration.
func (*Client) CreateCollectorConfigurationContext ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationContext( ctx context.Context, cfg *graylog.CollectorConfiguration, ) (*ErrorInfo, error)
CreateCollectorConfigurationContext creates a collector configuration with a context.
func (*Client) CreateCollectorConfigurationInput ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationInput( id string, input *graylog.CollectorConfigurationInput, ) (*ErrorInfo, error)
CreateCollectorConfigurationInput creates a collector configuration input.
func (*Client) CreateCollectorConfigurationInputContext ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationInputContext( ctx context.Context, id string, input *graylog.CollectorConfigurationInput, ) (*ErrorInfo, error)
CreateCollectorConfigurationInputContext creates a collector configuration input with a context.
func (*Client) CreateCollectorConfigurationOutput ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationOutput( id string, output *graylog.CollectorConfigurationOutput, ) (*ErrorInfo, error)
CreateCollectorConfigurationOutput creates a collector configuration output.
func (*Client) CreateCollectorConfigurationOutputContext ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationOutputContext( ctx context.Context, id string, output *graylog.CollectorConfigurationOutput, ) (*ErrorInfo, error)
CreateCollectorConfigurationOutputContext creates a collector configuration output with a context.
func (*Client) CreateCollectorConfigurationSnippet ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationSnippet( id string, snippet *graylog.CollectorConfigurationSnippet, ) (*ErrorInfo, error)
CreateCollectorConfigurationSnippet creates a collector configuration snippet.
func (*Client) CreateCollectorConfigurationSnippetContext ¶ added in v0.7.0
func (client *Client) CreateCollectorConfigurationSnippetContext( ctx context.Context, id string, snippet *graylog.CollectorConfigurationSnippet, ) (*ErrorInfo, error)
CreateCollectorConfigurationSnippetContext creates a collector configuration snippet with a context.
func (*Client) CreateDashboard ¶ added in v0.4.0
CreateDashboard creates a new dashboard account.
func (*Client) CreateDashboardContext ¶ added in v0.4.0
func (client *Client) CreateDashboardContext( ctx context.Context, dashboard *graylog.Dashboard, ) (*ErrorInfo, error)
CreateDashboardContext creates a new dashboard account with a context.
func (*Client) CreateDashboardWidget ¶ added in v0.8.0
func (client *Client) CreateDashboardWidget(dashboardID string, widget graylog.Widget) (graylog.Widget, *ErrorInfo, error)
CreateDashboardWidget creates a new dashboard widget.
func (*Client) CreateDashboardWidgetContext ¶ added in v0.8.0
func (client *Client) CreateDashboardWidgetContext( ctx context.Context, dashboardID string, widget graylog.Widget, ) (graylog.Widget, *ErrorInfo, error)
CreateDashboardWidgetContext creates a new dashboard widget with a context.
func (*Client) CreateIndexSet ¶
CreateIndexSet creates a Index Set.
func (*Client) CreateIndexSetContext ¶
func (client *Client) CreateIndexSetContext( ctx context.Context, is *graylog.IndexSet, ) (*ErrorInfo, error)
CreateIndexSetContext creates a Index Set with a context.
func (*Client) CreateInput ¶
CreateInput creates an input.
func (*Client) CreateInputContext ¶
func (client *Client) CreateInputContext( ctx context.Context, input *graylog.Input, ) (ei *ErrorInfo, err error)
CreateInputContext creates an input with a context.
func (*Client) CreatePipelineRule ¶ added in v1.4.0
CreatePipelineRule creates a pipeline rule.
func (*Client) CreatePipelineRuleContext ¶ added in v1.4.0
func (client *Client) CreatePipelineRuleContext( ctx context.Context, rule *graylog.PipelineRule, ) (*ErrorInfo, error)
CreatePipelineRuleContext creates a pipeline rule with a context.
func (*Client) CreateRole ¶
CreateRole creates a new role.
func (*Client) CreateRoleContext ¶
func (client *Client) CreateRoleContext( ctx context.Context, role *graylog.Role, ) (*ErrorInfo, error)
CreateRoleContext creates a new role with a context.
func (*Client) CreateStream ¶
CreateStream creates a stream.
func (*Client) CreateStreamAlarmCallback ¶ added in v1.1.0
CreateStreamAlarmCallback creates an alarm callback.
func (*Client) CreateStreamAlarmCallbackContext ¶ added in v1.1.0
func (client *Client) CreateStreamAlarmCallbackContext( ctx context.Context, ac *graylog.AlarmCallback, ) (*ErrorInfo, error)
CreateStreamAlarmCallbackContext creates an alarm callback with a context.
func (*Client) CreateStreamAlertCondition ¶ added in v1.0.0
func (client *Client) CreateStreamAlertCondition(streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
CreateStreamAlertCondition creates an alert condition.
func (*Client) CreateStreamAlertConditionContext ¶ added in v1.0.0
func (client *Client) CreateStreamAlertConditionContext( ctx context.Context, streamID string, cond *graylog.AlertCondition, ) (*ErrorInfo, error)
CreateStreamAlertConditionContext creates an alert condition with a context.
func (*Client) CreateStreamContext ¶
func (client *Client) CreateStreamContext( ctx context.Context, stream *graylog.Stream, ) (*ErrorInfo, error)
CreateStreamContext creates a stream with a context.
func (*Client) CreateStreamRule ¶
CreateStreamRule creates a stream
func (*Client) CreateStreamRuleContext ¶
func (client *Client) CreateStreamRuleContext( ctx context.Context, rule *graylog.StreamRule, ) (*ErrorInfo, error)
CreateStreamRuleContext creates a stream with a context
func (*Client) CreateUser ¶
CreateUser creates a new user account.
func (*Client) CreateUserContext ¶
func (client *Client) CreateUserContext( ctx context.Context, user *graylog.User, ) (*ErrorInfo, error)
CreateUserContext creates a new user account with a context.
func (*Client) DeleteCollectorConfiguration ¶ added in v0.7.0
DeleteCollectorConfiguration deletes a collector configuration.
func (*Client) DeleteCollectorConfigurationContext ¶ added in v0.7.0
func (client *Client) DeleteCollectorConfigurationContext( ctx context.Context, id string, ) (*ErrorInfo, error)
DeleteCollectorConfigurationContext deletes a collector configuration with a context.
func (*Client) DeleteCollectorConfigurationInput ¶ added in v0.7.0
DeleteCollectorConfigurationInput deletes a collector configuration input.
func (*Client) DeleteCollectorConfigurationInputContext ¶ added in v0.7.0
func (client *Client) DeleteCollectorConfigurationInputContext( ctx context.Context, id, inputID string, ) (*ErrorInfo, error)
DeleteCollectorConfigurationInputContext deletes a collector configuration input with a context.
func (*Client) DeleteCollectorConfigurationOutput ¶ added in v0.7.0
DeleteCollectorConfigurationOutput deletes a collector configuration output.
func (*Client) DeleteCollectorConfigurationOutputContext ¶ added in v0.7.0
func (client *Client) DeleteCollectorConfigurationOutputContext( ctx context.Context, id, outputID string, ) (*ErrorInfo, error)
DeleteCollectorConfigurationOutputContext deletes a collector configuration output with a context.
func (*Client) DeleteCollectorConfigurationSnippet ¶ added in v0.7.0
DeleteCollectorConfigurationSnippet deletes a collector configuration snippet.
func (*Client) DeleteCollectorConfigurationSnippetContext ¶ added in v0.7.0
func (client *Client) DeleteCollectorConfigurationSnippetContext( ctx context.Context, id, snippetID string, ) (*ErrorInfo, error)
DeleteCollectorConfigurationSnippetContext deletes a collector configuration snippet with a context.
func (*Client) DeleteDashboard ¶ added in v0.4.0
DeleteDashboard deletes a given dashboard.
func (*Client) DeleteDashboardContext ¶ added in v0.4.0
DeleteDashboardContext deletes a given dashboard with a context.
func (*Client) DeleteDashboardWidget ¶ added in v0.8.0
DeleteDashboardWidget deletes a given dashboard widget.
func (*Client) DeleteDashboardWidgetContext ¶ added in v0.8.0
func (client *Client) DeleteDashboardWidgetContext( ctx context.Context, dashboardID, widgetID string, ) (*ErrorInfo, error)
DeleteDashboardWidgetContext deletes a given dashboard widget with a context.
func (*Client) DeleteIndexSet ¶
DeleteIndexSet deletes a given Index Set.
func (*Client) DeleteIndexSetContext ¶
DeleteIndexSetContext deletes a given Index Set with a context.
func (*Client) DeleteInput ¶
DeleteInput deletes an given input.
func (*Client) DeleteInputContext ¶
DeleteInputContext deletes an given input with a context.
func (*Client) DeleteLDAPSetting ¶ added in v0.6.0
DeleteLDAPSetting deletes the LDAP setting.
func (*Client) DeleteLDAPSettingContext ¶ added in v0.6.0
DeleteLDAPSettingContext deletes the LDAP setting with a context.
func (*Client) DeletePipelineRule ¶ added in v1.4.0
DeletePipelineRule deletes a pipeline rule.
func (*Client) DeletePipelineRuleContext ¶ added in v1.4.0
func (client *Client) DeletePipelineRuleContext( ctx context.Context, id string, ) (*ErrorInfo, error)
DeletePipelineRuleContext deletes a pipeline rule with a context.
func (*Client) DeleteRole ¶
DeleteRole deletes a given role.
func (*Client) DeleteRoleContext ¶
DeleteRoleContext deletes a given role with a context.
func (*Client) DeleteStream ¶
DeleteStream deletes a stream.
func (*Client) DeleteStreamAlarmCallback ¶ added in v1.1.0
DeleteStreamAlarmCallback deletes an alarm callback.
func (*Client) DeleteStreamAlarmCallbackContext ¶ added in v1.1.0
func (client *Client) DeleteStreamAlarmCallbackContext( ctx context.Context, streamID, id string, ) (*ErrorInfo, error)
DeleteStreamAlarmCallbackContext deletes an alarm callback with a context.
func (*Client) DeleteStreamAlertCondition ¶ added in v1.0.0
DeleteStreamAlertCondition deletes an alert condition.
func (*Client) DeleteStreamAlertConditionContext ¶ added in v1.0.0
func (client *Client) DeleteStreamAlertConditionContext( ctx context.Context, streamID, id string, ) (*ErrorInfo, error)
DeleteStreamAlertConditionContext deletes an alert condition with a context.
func (*Client) DeleteStreamContext ¶
DeleteStreamContext deletes a stream with a context.
func (*Client) DeleteStreamRule ¶
DeleteStreamRule deletes a stream rule
func (*Client) DeleteStreamRuleContext ¶
func (client *Client) DeleteStreamRuleContext( ctx context.Context, streamID, ruleID string, ) (*ErrorInfo, error)
DeleteStreamRuleContext deletes a stream rule with a context
func (*Client) DeleteUser ¶
DeleteUser deletes a given user.
func (*Client) DeleteUserContext ¶
DeleteUserContext deletes a given user with a context.
func (*Client) GetAlarmCallbacks ¶ added in v0.5.0
GetAlarmCallbacks returns all alarm callbacks.
func (*Client) GetAlarmCallbacksContext ¶ added in v0.5.0
func (client *Client) GetAlarmCallbacksContext(ctx context.Context) ( []graylog.AlarmCallback, int, *ErrorInfo, error, )
GetAlarmCallbacksContext returns all alarm callbacks with a context.
func (*Client) GetAlertConditions ¶ added in v0.2.0
GetAlertConditions returns all alert conditions.
func (*Client) GetAlertConditionsContext ¶ added in v0.2.0
func (client *Client) GetAlertConditionsContext(ctx context.Context) ( []graylog.AlertCondition, int, *ErrorInfo, error, )
GetAlertConditionsContext returns all alert conditions with a context.
func (*Client) GetAlertContext ¶ added in v0.3.0
func (client *Client) GetAlertContext(ctx context.Context, id string) ( *graylog.Alert, *ErrorInfo, error, )
GetAlertContext returns an alert with a context.
func (*Client) GetAlertsContext ¶ added in v0.3.0
func (client *Client) GetAlertsContext(ctx context.Context, skip, limit int) ( []graylog.Alert, int, *ErrorInfo, error, )
GetAlertsContext returns all alerts with a context.
func (*Client) GetCollectorConfiguration ¶ added in v0.7.0
func (client *Client) GetCollectorConfiguration(id string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
GetCollectorConfiguration returns a collector configuration.
func (*Client) GetCollectorConfigurationContext ¶ added in v0.7.0
func (client *Client) GetCollectorConfigurationContext( ctx context.Context, id string, ) (*graylog.CollectorConfiguration, *ErrorInfo, error)
GetCollectorConfigurationContext returns a given user with a context.
func (*Client) GetCollectorConfigurations ¶ added in v0.7.0
func (client *Client) GetCollectorConfigurations() ([]graylog.CollectorConfiguration, int, *ErrorInfo, error)
GetCollectorConfigurations returns all collector configurations.
func (*Client) GetCollectorConfigurationsContext ¶ added in v0.7.0
func (client *Client) GetCollectorConfigurationsContext(ctx context.Context) ([]graylog.CollectorConfiguration, int, *ErrorInfo, error)
GetCollectorConfigurationsContext returns all collector configurations with a context.
func (*Client) GetDashboard ¶ added in v0.4.0
GetDashboard returns a given dashboard.
func (*Client) GetDashboardContext ¶ added in v0.4.0
func (client *Client) GetDashboardContext( ctx context.Context, id string, ) (*graylog.Dashboard, *ErrorInfo, error)
GetDashboardContext returns a given dashboard with a context.
func (*Client) GetDashboardWidget ¶ added in v0.8.0
func (client *Client) GetDashboardWidget(dashboardID, widgetID string) (graylog.Widget, *ErrorInfo, error)
GetDashboardWidget gets a dashboard widget.
func (*Client) GetDashboardWidgetContext ¶ added in v0.8.0
func (client *Client) GetDashboardWidgetContext( ctx context.Context, dashboardID, widgetID string, ) (graylog.Widget, *ErrorInfo, error)
GetDashboardWidgetContext gets a dashboard widget with a context.
func (*Client) GetDashboards ¶ added in v0.4.0
GetDashboards returns all dashboards.
func (*Client) GetDashboardsContext ¶ added in v0.4.0
func (client *Client) GetDashboardsContext(ctx context.Context) ([]graylog.Dashboard, int, *ErrorInfo, error)
GetDashboardsContext returns all dashboards with a context.
func (*Client) GetEnabledStreams ¶
func (client *Client) GetEnabledStreams() ( streams []graylog.Stream, total int, ei *ErrorInfo, err error, )
GetEnabledStreams returns all enabled streams.
func (*Client) GetEnabledStreamsContext ¶
func (client *Client) GetEnabledStreamsContext( ctx context.Context, ) (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
GetEnabledStreamsContext returns all enabled streams with a context.
func (*Client) GetIndexSet ¶
GetIndexSet returns a given index set.
func (*Client) GetIndexSetContext ¶
func (client *Client) GetIndexSetContext( ctx context.Context, id string, ) (*graylog.IndexSet, *ErrorInfo, error)
GetIndexSetContext returns a given index set with a context.
func (*Client) GetIndexSetStats ¶
GetIndexSetStats returns a given Index Set statistics.
func (*Client) GetIndexSetStatsContext ¶
func (client *Client) GetIndexSetStatsContext( ctx context.Context, id string, ) (*graylog.IndexSetStats, *ErrorInfo, error)
GetIndexSetStatsContext returns a given Index Set statistics with a context.
func (*Client) GetIndexSets ¶
func (client *Client) GetIndexSets( skip, limit int, stats bool, ) ([]graylog.IndexSet, map[string]graylog.IndexSetStats, int, *ErrorInfo, error)
GetIndexSets returns a list of all index sets.
func (*Client) GetIndexSetsContext ¶
func (client *Client) GetIndexSetsContext( ctx context.Context, skip, limit int, stats bool, ) ([]graylog.IndexSet, map[string]graylog.IndexSetStats, int, *ErrorInfo, error)
GetIndexSetsContext returns a list of all index sets with a context.
func (*Client) GetInputContext ¶
func (client *Client) GetInputContext( ctx context.Context, id string, ) (*graylog.Input, *ErrorInfo, error)
GetInputContext returns a given input with a context.
func (*Client) GetInputsContext ¶
func (client *Client) GetInputsContext(ctx context.Context) ( []graylog.Input, int, *ErrorInfo, error, )
GetInputsContext returns all inputs with a context.
func (*Client) GetLDAPGroupRoleMapping ¶ added in v0.10.0
GetLDAPGroupRoleMapping returns the LDAP group and role mapping.
func (*Client) GetLDAPGroupRoleMappingContext ¶ added in v0.10.0
func (client *Client) GetLDAPGroupRoleMappingContext(ctx context.Context) (map[string]string, *ErrorInfo, error)
GetLDAPGroupRoleMappingContext returns the LDAP group and role mapping with a context.
func (*Client) GetLDAPGroups ¶ added in v0.10.0
GetLDAPGroups returns the available LDAP groups.
func (*Client) GetLDAPGroupsContext ¶ added in v0.10.0
GetLDAPGroupsContext returns the available LDAP groups with a context.
func (*Client) GetLDAPSetting ¶ added in v0.6.0
GetLDAPSetting returns the LDAP setting.
func (*Client) GetLDAPSettingContext ¶ added in v0.6.0
func (client *Client) GetLDAPSettingContext(ctx context.Context) ( *graylog.LDAPSetting, *ErrorInfo, error, )
GetLDAPSettingContext returns the LDAP setting with a context.
func (*Client) GetPipelineRule ¶ added in v1.4.0
GetPipelineRule returns a pipeline rule.
func (*Client) GetPipelineRuleContext ¶ added in v1.4.0
func (client *Client) GetPipelineRuleContext(ctx context.Context, id string) ( *graylog.PipelineRule, *ErrorInfo, error, )
GetPipelineRuleContext returns a pipeline rule with a context.
func (*Client) GetPipelineRules ¶ added in v1.4.0
GetPipelineRules returns all pipeline rules.
func (*Client) GetPipelineRulesContext ¶ added in v1.4.0
func (client *Client) GetPipelineRulesContext(ctx context.Context) ( []graylog.PipelineRule, *ErrorInfo, error, )
GetPipelineRulesContext returns all pipeline rules with a context.
func (*Client) GetRoleContext ¶
func (client *Client) GetRoleContext( ctx context.Context, name string, ) (*graylog.Role, *ErrorInfo, error)
GetRoleContext returns a given role with a context.
func (*Client) GetRoleMembers ¶
GetRoleMembers returns a given role's members.
func (*Client) GetRoleMembersContext ¶
func (client *Client) GetRoleMembersContext( ctx context.Context, name string, ) ([]graylog.User, *ErrorInfo, error)
GetRoleMembersContext returns a given role's members with a context.
func (*Client) GetRolesContext ¶
func (client *Client) GetRolesContext(ctx context.Context) ( []graylog.Role, int, *ErrorInfo, error, )
GetRolesContext returns all roles with a context.
func (*Client) GetStreamAlarmCallback ¶ added in v1.1.0
func (client *Client) GetStreamAlarmCallback( streamID, id string, ) (graylog.AlarmCallback, *ErrorInfo, error)
GetStreamAlarmCallback gets an alarm callback.
func (*Client) GetStreamAlarmCallbackContext ¶ added in v1.1.0
func (client *Client) GetStreamAlarmCallbackContext( ctx context.Context, streamID, id string, ) (graylog.AlarmCallback, *ErrorInfo, error)
GetStreamAlarmCallbackContext gets an alarm callback with a context.
func (*Client) GetStreamAlarmCallbacks ¶ added in v1.1.0
func (client *Client) GetStreamAlarmCallbacks(streamID string) ( acs []graylog.AlarmCallback, total int, ei *ErrorInfo, err error, )
GetStreamAlarmCallbacks gets all alarm callbacks of this stream.
func (*Client) GetStreamAlarmCallbacksContext ¶ added in v1.1.0
func (client *Client) GetStreamAlarmCallbacksContext( ctx context.Context, streamID string, ) (acs []graylog.AlarmCallback, total int, ei *ErrorInfo, err error)
GetStreamAlarmCallbacksContext gets all alarm callbacks of this stream with a context.
func (*Client) GetStreamAlertCondition ¶ added in v1.0.0
func (client *Client) GetStreamAlertCondition(streamID, id string) (graylog.AlertCondition, *ErrorInfo, error)
GetStreamAlertCondition gets an alert condition.
func (*Client) GetStreamAlertConditionContext ¶ added in v1.0.0
func (client *Client) GetStreamAlertConditionContext( ctx context.Context, streamID, id string, ) (graylog.AlertCondition, *ErrorInfo, error)
GetStreamAlertConditionContext gets an alert condition with a context.
func (*Client) GetStreamAlertConditions ¶ added in v1.0.0
func (client *Client) GetStreamAlertConditions(streamID string) ( conds []graylog.AlertCondition, total int, ei *ErrorInfo, err error, )
GetStreamAlertConditions gets all alert conditions of this stream.
func (*Client) GetStreamAlertConditionsContext ¶ added in v1.0.0
func (client *Client) GetStreamAlertConditionsContext( ctx context.Context, streamID string, ) (conds []graylog.AlertCondition, total int, ei *ErrorInfo, err error)
GetStreamAlertConditionsContext gets all alert conditions of this stream with a context.
func (*Client) GetStreamContext ¶
func (client *Client) GetStreamContext( ctx context.Context, id string, ) (*graylog.Stream, *ErrorInfo, error)
GetStreamContext returns a given stream with a context.
func (*Client) GetStreamRule ¶
func (client *Client) GetStreamRule(streamID, ruleID string) (*graylog.StreamRule, *ErrorInfo, error)
GetStreamRule returns a stream rule
func (*Client) GetStreamRuleContext ¶
func (client *Client) GetStreamRuleContext( ctx context.Context, streamID, ruleID string, ) (*graylog.StreamRule, *ErrorInfo, error)
GetStreamRuleContext returns a stream rule with a context
func (*Client) GetStreamRules ¶
func (client *Client) GetStreamRules(streamID string) ( streamRules []graylog.StreamRule, total int, ei *ErrorInfo, err error, )
GetStreamRules returns a list of all stream rules
func (*Client) GetStreamRulesContext ¶
func (client *Client) GetStreamRulesContext( ctx context.Context, streamID string, ) (streamRules []graylog.StreamRule, total int, ei *ErrorInfo, err error)
GetStreamRulesContext returns a list of all stream rules with a context.
func (*Client) GetStreams ¶
func (client *Client) GetStreams() ( streams []graylog.Stream, total int, ei *ErrorInfo, err error, )
GetStreams returns all streams.
func (*Client) GetStreamsContext ¶
func (client *Client) GetStreamsContext( ctx context.Context, ) (streams []graylog.Stream, total int, ei *ErrorInfo, err error)
GetStreamsContext returns all streams with a context.
func (*Client) GetTotalIndexSetsStats ¶
GetTotalIndexSetsStats returns stats of all Index Sets.
func (*Client) GetTotalIndexSetsStatsContext ¶
func (client *Client) GetTotalIndexSetsStatsContext( ctx context.Context, ) (*graylog.IndexSetStats, *ErrorInfo, error)
GetTotalIndexSetsStatsContext returns stats of all Index Sets with a context.
func (*Client) GetUserContext ¶
func (client *Client) GetUserContext( ctx context.Context, name string, ) (*graylog.User, *ErrorInfo, error)
GetUserContext returns a given user with a context.
func (*Client) GetUsersContext ¶
GetUsersContext returns all users with a context.
func (*Client) PauseStream ¶
PauseStream pauses a stream.
func (*Client) PauseStreamContext ¶
PauseStreamContext pauses a stream with a context.
func (*Client) RemoveUserFromRole ¶
RemoveUserFromRole removes a user from a role.
func (*Client) RemoveUserFromRoleContext ¶
func (client *Client) RemoveUserFromRoleContext( ctx context.Context, userName, roleName string, ) (*ErrorInfo, error)
RemoveUserFromRoleContext removes a user from a role with a context.
func (*Client) RenameCollectorConfiguration ¶ added in v0.7.0
func (client *Client) RenameCollectorConfiguration(id, name string) (*graylog.CollectorConfiguration, *ErrorInfo, error)
RenameCollectorConfiguration renames a collector configuration.
func (*Client) RenameCollectorConfigurationContext ¶ added in v0.7.0
func (client *Client) RenameCollectorConfigurationContext( ctx context.Context, id, name string, ) (*graylog.CollectorConfiguration, *ErrorInfo, error)
RenameCollectorConfigurationContext renames a collector configuration with a context.
func (*Client) ResumeStream ¶
ResumeStream resumes a stream.
func (*Client) ResumeStreamContext ¶
ResumeStreamContext resumes a stream with a context.
func (*Client) SetDefaultIndexSet ¶
SetDefaultIndexSet sets default Index Set.
func (*Client) SetDefaultIndexSetContext ¶
func (client *Client) SetDefaultIndexSetContext( ctx context.Context, id string, ) (*graylog.IndexSet, *ErrorInfo, error)
SetDefaultIndexSetContext sets default Index Set with a context.
func (*Client) SetXRequestedBy ¶ added in v0.11.0
SetXRequestedBy sets a custom header "X-Requested-By". The default value is "go-graylog".
func (*Client) UpdateCollectorConfigurationInput ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationInput( id, inputID string, input *graylog.CollectorConfigurationInput, ) (*ErrorInfo, error)
UpdateCollectorConfigurationInput updates a collector configuration input.
func (*Client) UpdateCollectorConfigurationInputContext ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationInputContext( ctx context.Context, id, inputID string, input *graylog.CollectorConfigurationInput, ) (*ErrorInfo, error)
UpdateCollectorConfigurationInputContext updates a collector configuration input with a context.
func (*Client) UpdateCollectorConfigurationOutput ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationOutput( id, outputID string, output *graylog.CollectorConfigurationOutput, ) (*ErrorInfo, error)
UpdateCollectorConfigurationOutput updates a collector configuration output.
func (*Client) UpdateCollectorConfigurationOutputContext ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationOutputContext( ctx context.Context, id, outputID string, output *graylog.CollectorConfigurationOutput, ) (*ErrorInfo, error)
UpdateCollectorConfigurationOutputContext updates a collector configuration output with a context.
func (*Client) UpdateCollectorConfigurationSnippet ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationSnippet( id, snippetID string, snippet *graylog.CollectorConfigurationSnippet, ) (*ErrorInfo, error)
UpdateCollectorConfigurationSnippet updates a collector configuration snippet.
func (*Client) UpdateCollectorConfigurationSnippetContext ¶ added in v0.7.0
func (client *Client) UpdateCollectorConfigurationSnippetContext( ctx context.Context, id, snippetID string, snippet *graylog.CollectorConfigurationSnippet, ) (*ErrorInfo, error)
UpdateCollectorConfigurationSnippetContext updates a collector configuration snippet with a context.
func (*Client) UpdateDashboard ¶ added in v0.4.0
UpdateDashboard updates a given dashboard.
func (*Client) UpdateDashboardContext ¶ added in v0.4.0
func (client *Client) UpdateDashboardContext( ctx context.Context, dashboard *graylog.Dashboard, ) (*ErrorInfo, error)
UpdateDashboardContext updates a given dashboard with a context.
func (*Client) UpdateIndexSet ¶
func (client *Client) UpdateIndexSet(is *graylog.IndexSetUpdateParams) (*graylog.IndexSet, *ErrorInfo, error)
UpdateIndexSet updates a given Index Set.
func (*Client) UpdateIndexSetContext ¶
func (client *Client) UpdateIndexSetContext( ctx context.Context, prms *graylog.IndexSetUpdateParams, ) (*graylog.IndexSet, *ErrorInfo, error)
UpdateIndexSetContext updates a given Index Set with a context.
func (*Client) UpdateInput ¶
func (client *Client) UpdateInput(input *graylog.InputUpdateParams) (*graylog.Input, *ErrorInfo, error)
UpdateInput updates an given input.
func (*Client) UpdateInputContext ¶
func (client *Client) UpdateInputContext( ctx context.Context, prms *graylog.InputUpdateParams, ) (*graylog.Input, *ErrorInfo, error)
UpdateInputContext updates an given input with a context.
func (*Client) UpdateLDAPGroupRoleMapping ¶ added in v0.10.0
UpdateLDAPGroupRoleMapping updates the LDAP group and role mapping.
func (*Client) UpdateLDAPGroupRoleMappingContext ¶ added in v0.10.0
func (client *Client) UpdateLDAPGroupRoleMappingContext(ctx context.Context, mapping map[string]string) (*ErrorInfo, error)
UpdateLDAPGroupRoleMappingContext returns the LDAP group and role mapping with a context.
func (*Client) UpdateLDAPSetting ¶ added in v0.6.0
UpdateLDAPSetting updates the LDAP setting.
func (*Client) UpdateLDAPSettingContext ¶ added in v0.6.0
func (client *Client) UpdateLDAPSettingContext( ctx context.Context, prms *graylog.LDAPSetting, ) (*ErrorInfo, error)
UpdateLDAPSettingContext updates the LDAP setting with a context.
func (*Client) UpdatePipelineRule ¶ added in v1.4.0
UpdatePipelineRule updates a pipeline rule.
func (*Client) UpdatePipelineRuleContext ¶ added in v1.4.0
func (client *Client) UpdatePipelineRuleContext( ctx context.Context, rule *graylog.PipelineRule, ) (*ErrorInfo, error)
UpdatePipelineRuleContext updates a pipeline rule with a context.
func (*Client) UpdateRole ¶
func (client *Client) UpdateRole(name string, role *graylog.RoleUpdateParams) ( *graylog.Role, *ErrorInfo, error, )
UpdateRole updates a given role.
func (*Client) UpdateRoleContext ¶
func (client *Client) UpdateRoleContext( ctx context.Context, name string, prms *graylog.RoleUpdateParams, ) (*graylog.Role, *ErrorInfo, error)
UpdateRoleContext updates a given role with a context.
func (*Client) UpdateStream ¶
UpdateStream updates a stream.
func (*Client) UpdateStreamAlarmCallback ¶ added in v1.1.0
UpdateStreamAlarmCallback modifies an alarm callback.
func (*Client) UpdateStreamAlarmCallbackContext ¶ added in v1.1.0
func (client *Client) UpdateStreamAlarmCallbackContext( ctx context.Context, ac *graylog.AlarmCallback, ) (*ErrorInfo, error)
UpdateStreamAlarmCallbackContext modifies an alarm callback with a context.
func (*Client) UpdateStreamAlertCondition ¶ added in v1.0.0
func (client *Client) UpdateStreamAlertCondition(streamID string, cond *graylog.AlertCondition) (*ErrorInfo, error)
UpdateStreamAlertCondition modifies an alert condition.
func (*Client) UpdateStreamAlertConditionContext ¶ added in v1.0.0
func (client *Client) UpdateStreamAlertConditionContext( ctx context.Context, streamID string, cond *graylog.AlertCondition, ) (*ErrorInfo, error)
UpdateStreamAlertConditionContext modifies an alert condition with a context.
func (*Client) UpdateStreamContext ¶
func (client *Client) UpdateStreamContext( ctx context.Context, stream *graylog.Stream, ) (*ErrorInfo, error)
UpdateStreamContext updates a stream with a context.
func (*Client) UpdateStreamRule ¶
UpdateStreamRule updates a stream rule
func (*Client) UpdateStreamRuleContext ¶
func (client *Client) UpdateStreamRuleContext( ctx context.Context, rule *graylog.StreamRule, ) (*ErrorInfo, error)
UpdateStreamRuleContext updates a stream rule
func (*Client) UpdateUser ¶
UpdateUser updates a given user.
type ErrorInfo ¶
type ErrorInfo struct { Type string `json:"type"` Message string `json:"message"` Request *http.Request `json:"request"` Response *http.Response `json:"response"` }
ErrorInfo represents Graylog API's error information. Basically Client methods (ex. CreateRole) returns this, but note that Response is closed.
Source Files ¶
- alarm_callback.go
- alert.go
- alert_condition.go
- client.go
- collector_configuration.go
- collector_configuration_input.go
- collector_configuration_output.go
- collector_configuration_snippet.go
- dashboard.go
- dashboard_widget.go
- doc.go
- error.go
- index_set.go
- index_set_stats.go
- input.go
- ldap_group.go
- ldap_setting.go
- pipeline_rule.go
- role.go
- role_member.go
- stream.go
- stream_alarm_callback.go
- stream_alert_condition.go
- stream_rule.go
- user.go
- util.go