Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type Actor
- type AuthenticationContext
- type BasicAuth
- type Client
- type ClientGeographicalContext
- type ClientGeographicalContextGeolocation
- type ClientUserAgent
- type Configuration
- type GenericOpenAPIError
- type GetLogsOpts
- type LogEvent
- type LogEventActor
- type LogEventOutcome
- type LogEventTransaction
- type LogsApiService
- type SecurityContext
- type Target
- type Transaction
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { LogsApi *LogsApiService // contains filtered or unexported fields }
APIClient manages communication with the System Log (Okta API) API v1.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AuthenticationContext ¶
type AuthenticationContext struct { AuthenticationProvider string `json:"authenticationProvider,omitempty"` CredentialProvider string `json:"credentialProvider,omitempty"` CredentialType string `json:"credentialType,omitempty"` Issuer map[string]interface{} `json:"issuer,omitempty"` ExternalSessionId string `json:"externalSessionId,omitempty"` Interface string `json:"interface,omitempty"` }
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Client ¶
type Client struct { UserAgent ClientUserAgent `json:"userAgent,omitempty"` GeographicalContext ClientGeographicalContext `json:"geographicalContext,omitempty"` Zone string `json:"zone,omitempty"` IpAddress string `json:"ipAddress,omitempty"` Device string `json:"device,omitempty"` Id string `json:"id,omitempty"` }
type ClientGeographicalContext ¶
type ClientGeographicalContext struct { Geolocation ClientGeographicalContextGeolocation `json:"geolocation,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` PostalCode string `json:"postalCode,omitempty"` }
type ClientUserAgent ¶
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type GetLogsOpts ¶
type LogEvent ¶
type LogEvent struct { Actor Actor `json:"actor"` Uuid string `json:"uuid"` Published string `json:"published"` EventType string `json:"eventType"` Version string `json:"version"` Severity string `json:"severity"` LegacyEventType string `json:"legacyEventType,omitempty"` DisplayMessage string `json:"displayMessage,omitempty"` Client Client `json:"client,omitempty"` Outcome LogEventOutcome `json:"outcome,omitempty"` Target []Target `json:"target,omitempty"` Transaction Transaction `json:"transaction,omitempty"` DebugContext map[string]interface{} `json:"debugContext,omitempty"` AuthenticationContext AuthenticationContext `json:"authenticationContext,omitempty"` SecurityContext SecurityContext `json:"securityContext,omitempty"` Request map[string]interface{} `json:"request,omitempty"` }
Log Events from Syslog
type LogEventActor ¶
type LogEventOutcome ¶
type LogEventTransaction ¶
type LogsApiService ¶
type LogsApiService service
func (*LogsApiService) GetLogs ¶
func (a *LogsApiService) GetLogs(ctx context.Context, localVarOptionals *GetLogsOpts) ([]LogEvent, *http.Response, error)
type SecurityContext ¶
type Transaction ¶
Source Files ¶
- api_logs.go
- client.go
- configuration.go
- model_actor.go
- model_authentication_context.go
- model_client.go
- model_client_geographical_context.go
- model_client_geographical_context_geolocation.go
- model_client_user_agent.go
- model_log_event.go
- model_log_event_actor.go
- model_log_event_outcome.go
- model_log_event_transaction.go
- model_security_context.go
- model_target.go
- model_transaction.go
- response.go