Documentation ¶
Index ¶
- func CreateAuthenticationKey(client *SplunkClient) (string, error)
- func HandleHttpError(body []byte) (string, error)
- func MakeHttpRequest(client *SplunkClient, method string, spRequestHeaders map[string]string, ...) (*http.Response, error)
- type SplunkClient
- func NewBasicAuthenticatedClient(client *http.Client, host string, port string, username string, ...) *SplunkClient
- func NewClient(client *http.Client, host string, port string, token string, username string, ...) *SplunkClient
- func NewClientAuthenticatedBySessionKey(client *http.Client, host string, port string, sessionKey string, skipSSL bool) *SplunkClient
- func NewClientAuthenticatedByToken(client *http.Client, host string, port string, token string, skipSSL bool) *SplunkClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthenticationKey ¶
func CreateAuthenticationKey(client *SplunkClient) (string, error)
create an authentication key depending on the method provided
three methods are available: 1. HTTP Authorization tokens : a seesion key 2. Splunk Authentication tokens 3. Basic Authentication
func HandleHttpError ¶
return the message of the error when got http error
Types ¶
type SplunkClient ¶
type SplunkClient struct { Client *http.Client Host string Port string Endpoint string Token string Username string Password string SessionKey string // if true, ssl verification is skipped SkipSSL bool }
func NewBasicAuthenticatedClient ¶
func NewBasicAuthenticatedClient(client *http.Client, host string, port string, username string, password string, skipSSL bool) *SplunkClient
create a new client with basic authentication method
func NewClient ¶
func NewClient(client *http.Client, host string, port string, token string, username string, password string, sessionKey string, skipSSL bool) *SplunkClient
create a new Client
func NewClientAuthenticatedBySessionKey ¶
func NewClientAuthenticatedBySessionKey(client *http.Client, host string, port string, sessionKey string, skipSSL bool) *SplunkClient
create a new client that could connect with authentication sessionKey
func NewClientAuthenticatedByToken ¶
func NewClientAuthenticatedByToken(client *http.Client, host string, port string, token string, skipSSL bool) *SplunkClient
create a new client that could connect with authentication tokens
Click to show internal directories.
Click to hide internal directories.