Documentation ¶
Index ¶
Constants ¶
const ( CloudUs1 = iota CloudUs2 CloudEu1 CloudUsGov1 )
Variables ¶
var (
Version = "0.2.1"
)
Functions ¶
func ErrorExplain ¶
ErrorExplain extracts as much information from the error object as possible and returns as human readable string. This is useful for developers as gofalcon/falcon/client library is swagger generated and various error classes do not adhere to a common interface.
Types ¶
type ApiConfig ¶
type ApiConfig struct { // Client ID used for authentication with CrowdStrike Falcon platform. *required* ClientId string // Client Secret used for authentication with CrowdStrike Falcon platform. *required* ClientSecret string // Optional: CID selector for cases when the ClientID/ClientSecret has access to multiple CIDs MemberCID string // This Context object will be used only when authenticating with the OAuth interface. Context context.Context // Cloud allows us to select Falcon Cloud to connect Cloud CloudType // HostOverride allows to override default host (default: api.crowdstrike.com) HostOverride string // BasePathOverride allows to override default base path (default: /) BasePathOverride string // Debug forces print out of all http traffic going through the API Runtime Debug bool }
ApiConfig object is used to initialise and configure API Client. Together with NewClient function, ApiConfig provides preferred way to initiate API communication.
type CloudType ¶
type CloudType int
func Cloud ¶
Cloud parses clould string (example: us-1, us-2, eu-1, us-gov-1, etc). If a string is not recognised CloudUs1 is returned.
func CloudValidate ¶
CloudValidate parses cloud string (example: us-1, us-2, eu-1, us-gov-1, etc.). Error is returned when string cannot be recognised
type CommonPayload ¶
Common interface for *Payload structures in the gofalcon/falcon/client library.
func ErrorExtractPayload ¶
func ErrorExtractPayload(apiError error) CommonPayload
ErrorExtractPayload pops out a .Payload member from the API Error (if included).
type StreamingError ¶
StreamingError structure that holds original error and indicates whether the Error is likely fatal or not
func (StreamingError) Error ¶
func (e StreamingError) Error() string
type StreamingHandle ¶
type StreamingHandle struct { Events chan *streaming_models.EventItem Errors chan StreamingError // contains filtered or unexported fields }
StreamingHandle is higher order type that allows for easy use of CrowdStrike Falcon Streaming API
func NewStream ¶
func NewStream(ctx context.Context, client *client.CrowdStrikeAPISpecification, appId string, stream *models.MainAvailableStreamV2) (*StreamingHandle, error)
NewStream initializes new StreamingHandle. Users are advised to read from the StreamingHandle channels
func (*StreamingHandle) Close ¶
func (sh *StreamingHandle) Close()
Close the StreamingHandle after use