Documentation ¶
Index ¶
- Constants
- func NewSplunkdHTTPClient(timeout time.Duration, skipValidateTLS bool) (*http.Client, error)
- type Client
- func (c *Client) BuildSplunkURL(queryValues url.Values, urlPathParts ...string) url.URL
- func (client *Client) CreateAdminSAMLGroups(name string, adminSAMLGroupsObject *models.AdminSAMLGroupsObject) error
- func (client *Client) CreateAppsLocalObject(app string, localAppObject *models.AppsLocalObject) error
- func (client *Client) CreateAuthenticationUser(name string, authenticationUserObject *models.AuthenticationUserObject) error
- func (client *Client) CreateAuthorizationRoles(name string, authorizationRolesObject *models.AuthorizationRolesObject) error
- func (client *Client) CreateConfigsConfObject(name string, owner string, app string, ...) error
- func (client *Client) CreateDashboardObject(owner string, app string, splunkDashboardsObj *models.SplunkDashboardsObject) error
- func (client *Client) CreateGlobalHttpEventCollectorObject(httpInputConfigObj models.GlobalHttpEventCollectorObject) error
- func (client *Client) CreateHttpEventCollectorObject(name string, owner string, app string, ...) error
- func (client *Client) CreateIndexObject(name string, owner string, app string, indexConfigObj *models.IndexObject) error
- func (client *Client) CreateMonitorInput(name string, owner string, app string, ...) error
- func (client *Client) CreateSavedSearches(name, owner, app string, savedSearchObject *models.SavedSearchObject) error
- func (client *Client) CreateScriptedInput(name string, owner string, app string, ...) error
- func (client *Client) CreateShIndexesManagerObject(name string, owner string, app string, ...) error
- func (client *Client) CreateSplunkTCPTokenInput(owner string, app string, ...) error
- func (client *Client) CreateTCPCookedInput(name string, owner string, app string, ...) error
- func (client *Client) CreateTCPDefaultOutput(name string, owner string, app string, ...) error
- func (client *Client) CreateTCPGroupOutput(name string, owner string, app string, ...) error
- func (client *Client) CreateTCPRawInput(name string, owner string, app string, ...) error
- func (client *Client) CreateTCPSSLInput(inputsTCPSSLObject *models.InputsTCPSSLObject) error
- func (client *Client) CreateTCPServerOutput(name string, owner string, app string, ...) error
- func (client *Client) CreateTCPSyslogOutput(name string, owner string, app string, ...) error
- func (client *Client) CreateUDPInput(name string, owner string, app string, inputsUDPObject *models.InputsUDPObject) error
- func (c *Client) Delete(deleteURL url.URL) (*http.Response, error)
- func (client *Client) DeleteAdminSAMLGroups(name string) (*http.Response, error)
- func (client *Client) DeleteAppsLocalObject(app string) (*http.Response, error)
- func (client *Client) DeleteAuthenticationUser(name string) (*http.Response, error)
- func (client *Client) DeleteAuthorizationRoles(name string) (*http.Response, error)
- func (client *Client) DeleteConfigsConfObject(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteDashboardObject(owner string, app string, name string) (*http.Response, error)
- func (client *Client) DeleteHttpEventCollectorObject(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteIndexObject(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteMonitorInput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteSavedSearches(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteScriptedInput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteShIndexesManagerObject(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteSplunkTCPTokenInput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPCookedInput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPDefaultOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPGroupOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPRawInput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPServerOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteTCPSyslogOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) DeleteUDPInput(name, owner, app string) (*http.Response, error)
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) DoRequest(method string, requestURL url.URL, body interface{}) (*http.Response, error)
- func (c *Client) EncodeObject(content interface{}) ([]byte, error)
- func (c *Client) EncodeRequestBody(content interface{}) ([]byte, error)
- func (c *Client) Get(getURL url.URL) (*http.Response, error)
- func (client *Client) GetAcl(owner, app, name string, resources ...string) (*http.Response, error)
- func (c *Client) Login() (e error)
- func (client *Client) Move(owner, app, name string, acl *models.ACLObject, resources ...string) error
- func (c *Client) NewRequest(httpMethod, url string, body io.Reader) (*http.Request, error)
- func (c *Client) Patch(patchURL url.URL, body interface{}) (*http.Response, error)
- func (c *Client) Post(postURL url.URL, body interface{}) (*http.Response, error)
- func (c *Client) Put(putURL url.URL, body interface{}) (*http.Response, error)
- func (client *Client) ReadAdminSAMLGroups(name string) (*http.Response, error)
- func (client *Client) ReadAllAppsLocalObject() (*http.Response, error)
- func (client *Client) ReadAllAuthorizationRoles() (*http.Response, error)
- func (client *Client) ReadAllConfigsConfObject(name string) (*http.Response, error)
- func (client *Client) ReadAllDashboardObject() (*http.Response, error)
- func (client *Client) ReadAllHttpEventCollectorObject() (*http.Response, error)
- func (client *Client) ReadAllIndexObject() (*http.Response, error)
- func (client *Client) ReadAllSavedSearches() (*http.Response, error)
- func (client *Client) ReadAllShIndexesManagerObject() (*http.Response, error)
- func (client *Client) ReadAppsLocalObject(app string) (*http.Response, error)
- func (client *Client) ReadAuthenticationUser(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadAuthenticationUsers() (*http.Response, error)
- func (client *Client) ReadAuthorizationRoles(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadConfigsConfObject(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadDashboardObject(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadGlobalHttpEventCollectorObject() (*http.Response, error)
- func (client *Client) ReadHttpEventCollectorObject(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadIndexObject(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadMonitorInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadMonitorInputs() (*http.Response, error)
- func (client *Client) ReadSavedSearches(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadScriptedInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadScriptedInputs() (*http.Response, error)
- func (client *Client) ReadShIndexesManagerObject(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadSplunkTCPTokenInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadSplunkTCPTokenInputs() (*http.Response, error)
- func (client *Client) ReadTCPCookedInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPCookedInputs() (*http.Response, error)
- func (client *Client) ReadTCPDefaultOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPDefaultOutputs() (*http.Response, error)
- func (client *Client) ReadTCPGroupOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPGroupOutputs() (*http.Response, error)
- func (client *Client) ReadTCPRawInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPRawInputs() (*http.Response, error)
- func (client *Client) ReadTCPSSLInput() (*http.Response, error)
- func (client *Client) ReadTCPSSLInputs() (*http.Response, error)
- func (client *Client) ReadTCPServerOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPServerOutputs() (*http.Response, error)
- func (client *Client) ReadTCPSyslogOutput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadTCPSyslogOutputs() (*http.Response, error)
- func (client *Client) ReadUDPInput(name, owner, app string) (*http.Response, error)
- func (client *Client) ReadUDPInputs() (*http.Response, error)
- func (client *Client) ResourcesAndNameForPath(path string) (resources []string, name string, ok bool)
- func (client *Client) SplitConfStanza(name string) (conf string, stanza string)
- func (client *Client) UpdateAcl(owner, app, name string, acl *models.ACLObject, resources ...string) error
- func (client *Client) UpdateAdminSAMLGroups(name string, adminSAMLGroupsObject *models.AdminSAMLGroupsObject) error
- func (client *Client) UpdateAppsLocalObject(app string, localAppObject *models.AppsLocalObject) error
- func (client *Client) UpdateAuthenticationUser(name string, authenticationUserObject *models.AuthenticationUserObject) error
- func (client *Client) UpdateAuthorizationRoles(name string, authorizationRolesObject *models.AuthorizationRolesObject) error
- func (client *Client) UpdateConfigsConfObject(name string, owner string, app string, ...) error
- func (client *Client) UpdateDashboardObject(owner string, app string, name string, ...) error
- func (client *Client) UpdateGlobalHttpEventCollectorObject(httpInputConfigObj models.GlobalHttpEventCollectorObject) error
- func (client *Client) UpdateHttpEventCollectorObject(name string, owner string, app string, ...) error
- func (client *Client) UpdateIndexObject(name string, owner string, app string, indexConfigObj *models.IndexObject) error
- func (client *Client) UpdateMonitorInput(name string, owner string, app string, ...) error
- func (client *Client) UpdateSavedSearches(name string, owner string, app string, ...) error
- func (client *Client) UpdateScriptedInput(name string, owner string, app string, ...) error
- func (client *Client) UpdateShIndexesManagerObject(name string, owner string, app string, ...) error
- func (client *Client) UpdateSplunkTCPTokenInput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPCookedInput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPDefaultOutput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPGroupOutput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPRawInput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPSSLInput(name string, inputsTCPSSLObject *models.InputsTCPSSLObject) error
- func (client *Client) UpdateTCPServerOutput(name string, owner string, app string, ...) error
- func (client *Client) UpdateTCPSyslogOutput(name string, owner string, app string, ...) error
- func (client *Client) UpdateUDPInput(name string, owner string, app string, inputsUDPObject *models.InputsUDPObject) error
Constants ¶
const ( MethodGet = "GET" MethodPost = "POST" MethodPut = "PUT" MethodPatch = "PATCH" MethodDelete = "DELETE" )
Declare constants for service package
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client is used to communicate with Splunkd endpoints
func NewDefaultSplunkdClient ¶
NewDefaultSplunkdClient creates a Client with default values
func NewSplunkdClient ¶
func NewSplunkdClient(sessionKey string, auth [2]string, host string, httpClient *http.Client) (*Client, error)
NewSplunkdClient creates a Client with custom values passed in
func NewSplunkdClientWithAuthToken ¶
func NewSplunkdClientWithAuthToken(authToken string, auth [2]string, host string, httpClient *http.Client) (*Client, error)
NewSplunkdClient creates a Client with custom values passed in
func (*Client) BuildSplunkURL ¶
func (*Client) CreateAdminSAMLGroups ¶
func (client *Client) CreateAdminSAMLGroups(name string, adminSAMLGroupsObject *models.AdminSAMLGroupsObject) error
func (*Client) CreateAppsLocalObject ¶
func (client *Client) CreateAppsLocalObject(app string, localAppObject *models.AppsLocalObject) error
func (*Client) CreateAuthenticationUser ¶
func (client *Client) CreateAuthenticationUser(name string, authenticationUserObject *models.AuthenticationUserObject) error
func (*Client) CreateAuthorizationRoles ¶
func (client *Client) CreateAuthorizationRoles(name string, authorizationRolesObject *models.AuthorizationRolesObject) error
func (*Client) CreateConfigsConfObject ¶
func (*Client) CreateDashboardObject ¶ added in v1.3.9
func (*Client) CreateGlobalHttpEventCollectorObject ¶
func (client *Client) CreateGlobalHttpEventCollectorObject(httpInputConfigObj models.GlobalHttpEventCollectorObject) error
func (*Client) CreateHttpEventCollectorObject ¶
func (*Client) CreateIndexObject ¶
func (*Client) CreateMonitorInput ¶
func (*Client) CreateSavedSearches ¶
func (client *Client) CreateSavedSearches(name, owner, app string, savedSearchObject *models.SavedSearchObject) error
func (*Client) CreateScriptedInput ¶
func (*Client) CreateShIndexesManagerObject ¶ added in v1.4.2
func (*Client) CreateSplunkTCPTokenInput ¶
func (*Client) CreateTCPCookedInput ¶
func (*Client) CreateTCPDefaultOutput ¶
func (*Client) CreateTCPGroupOutput ¶
func (*Client) CreateTCPRawInput ¶
func (*Client) CreateTCPSSLInput ¶
func (client *Client) CreateTCPSSLInput(inputsTCPSSLObject *models.InputsTCPSSLObject) error
func (*Client) CreateTCPServerOutput ¶
func (*Client) CreateTCPSyslogOutput ¶
func (*Client) CreateUDPInput ¶
func (*Client) DeleteAdminSAMLGroups ¶
func (*Client) DeleteAppsLocalObject ¶
func (*Client) DeleteAuthenticationUser ¶
func (*Client) DeleteAuthorizationRoles ¶
func (*Client) DeleteConfigsConfObject ¶
func (*Client) DeleteDashboardObject ¶ added in v1.3.9
func (*Client) DeleteHttpEventCollectorObject ¶
func (*Client) DeleteIndexObject ¶
func (*Client) DeleteMonitorInput ¶
func (*Client) DeleteSavedSearches ¶
func (*Client) DeleteScriptedInput ¶
func (*Client) DeleteShIndexesManagerObject ¶ added in v1.4.2
func (*Client) DeleteSplunkTCPTokenInput ¶
func (*Client) DeleteTCPCookedInput ¶
func (*Client) DeleteTCPDefaultOutput ¶
func (*Client) DeleteTCPGroupOutput ¶
func (*Client) DeleteTCPRawInput ¶
func (*Client) DeleteTCPServerOutput ¶
func (*Client) DeleteTCPSyslogOutput ¶
func (*Client) DeleteUDPInput ¶
func (*Client) DoRequest ¶
func (c *Client) DoRequest(method string, requestURL url.URL, body interface{}) (*http.Response, error)
DoRequest creates and execute a new request
func (*Client) EncodeObject ¶
EncodeObject encodes an object into url-encoded string
func (*Client) EncodeRequestBody ¶
EncodeRequestBody takes a json string or object and serializes it to be used in request body
func (*Client) GetAcl ¶
https://docs.splunk.com/Documentation/Splunk/8.0.4/RESTUM/RESTusing#Access_Control_List
func (*Client) NewRequest ¶
NewRequest creates a new HTTP Request and set proper header
func (*Client) ReadAdminSAMLGroups ¶
func (*Client) ReadAllAppsLocalObject ¶
func (*Client) ReadAllAuthorizationRoles ¶
services/authorization/roles
func (*Client) ReadAllConfigsConfObject ¶
func (*Client) ReadAllDashboardObject ¶ added in v1.3.9
func (*Client) ReadAllHttpEventCollectorObject ¶
services/data/inputs/http
func (*Client) ReadAllIndexObject ¶
func (*Client) ReadAllSavedSearches ¶
services/saved/searches
func (*Client) ReadAllShIndexesManagerObject ¶ added in v1.4.2
func (*Client) ReadAppsLocalObject ¶
func (*Client) ReadAuthenticationUser ¶
func (*Client) ReadAuthenticationUsers ¶
services/authentication/users
func (*Client) ReadAuthorizationRoles ¶
func (*Client) ReadConfigsConfObject ¶
func (*Client) ReadDashboardObject ¶ added in v1.3.9
func (*Client) ReadGlobalHttpEventCollectorObject ¶
func (*Client) ReadHttpEventCollectorObject ¶
func (*Client) ReadIndexObject ¶
func (*Client) ReadMonitorInput ¶
func (*Client) ReadMonitorInputs ¶
services/data/inputs/monitor
func (*Client) ReadSavedSearches ¶
func (*Client) ReadScriptedInput ¶
func (*Client) ReadScriptedInputs ¶
services/data/inputs/script
func (*Client) ReadShIndexesManagerObject ¶ added in v1.4.2
func (*Client) ReadSplunkTCPTokenInput ¶
func (*Client) ReadSplunkTCPTokenInputs ¶
services/data/inputs/tcp/splunktcptoken
func (*Client) ReadTCPCookedInput ¶
func (*Client) ReadTCPCookedInputs ¶
services/data/inputs/tcp/cooked
func (*Client) ReadTCPDefaultOutput ¶
func (*Client) ReadTCPDefaultOutputs ¶
services/data/outputs/tcp/default
func (*Client) ReadTCPGroupOutput ¶
func (*Client) ReadTCPGroupOutputs ¶
services/data/outputs/tcp/group
func (*Client) ReadTCPRawInput ¶
func (*Client) ReadTCPRawInputs ¶
services/data/inputs/tcp/raw
func (*Client) ReadTCPServerOutput ¶
func (*Client) ReadTCPServerOutputs ¶
services/data/outputs/tcp/server
func (*Client) ReadTCPSyslogOutput ¶
func (*Client) ReadTCPSyslogOutputs ¶
services/data/outputs/tcp/syslog
func (*Client) ReadUDPInput ¶
func (*Client) ReadUDPInputs ¶
services/data/inputs/udp
func (*Client) ResourcesAndNameForPath ¶ added in v1.4.8
func (*Client) SplitConfStanza ¶
Takes a '/' separated string and returns the 0, 1 indexed strings from the split
func (*Client) UpdateAdminSAMLGroups ¶
func (client *Client) UpdateAdminSAMLGroups(name string, adminSAMLGroupsObject *models.AdminSAMLGroupsObject) error
func (*Client) UpdateAppsLocalObject ¶
func (client *Client) UpdateAppsLocalObject(app string, localAppObject *models.AppsLocalObject) error
func (*Client) UpdateAuthenticationUser ¶
func (client *Client) UpdateAuthenticationUser(name string, authenticationUserObject *models.AuthenticationUserObject) error
func (*Client) UpdateAuthorizationRoles ¶
func (client *Client) UpdateAuthorizationRoles(name string, authorizationRolesObject *models.AuthorizationRolesObject) error
func (*Client) UpdateConfigsConfObject ¶
func (*Client) UpdateDashboardObject ¶ added in v1.3.9
func (*Client) UpdateGlobalHttpEventCollectorObject ¶
func (client *Client) UpdateGlobalHttpEventCollectorObject(httpInputConfigObj models.GlobalHttpEventCollectorObject) error
func (*Client) UpdateHttpEventCollectorObject ¶
func (*Client) UpdateIndexObject ¶
func (*Client) UpdateMonitorInput ¶
func (*Client) UpdateSavedSearches ¶
func (*Client) UpdateScriptedInput ¶
func (*Client) UpdateShIndexesManagerObject ¶ added in v1.4.2
func (*Client) UpdateSplunkTCPTokenInput ¶
func (*Client) UpdateTCPCookedInput ¶
func (*Client) UpdateTCPDefaultOutput ¶
func (*Client) UpdateTCPGroupOutput ¶
func (*Client) UpdateTCPRawInput ¶
func (*Client) UpdateTCPSSLInput ¶
func (client *Client) UpdateTCPSSLInput(name string, inputsTCPSSLObject *models.InputsTCPSSLObject) error
func (*Client) UpdateTCPServerOutput ¶
func (*Client) UpdateTCPSyslogOutput ¶
func (*Client) UpdateUDPInput ¶
Source Files ¶
- acl.go
- admin_saml_groups.go
- apps_local.go
- authentication_user.go
- authorization_roles.go
- client.go
- configs_conf.go
- data_ui_views.go
- index.go
- inputs_global_http_event_collector.go
- inputs_http_event_collector.go
- inputs_monitor.go
- inputs_script.go
- inputs_tcp_cooked.go
- inputs_tcp_raw.go
- inputs_tcp_splunk_tcp_token.go
- inputs_tcp_ssl.go
- inputs_udp.go
- outputs_tcp_default.go
- outputs_tcp_group.go
- outputs_tcp_server.go
- outputs_tcp_syslog.go
- saved_searches.go
- sh_indexes_manager.go