Documentation ¶
Index ¶
- Variables
- func FalconClient(ctx context.Context, r Request) (*client.CrowdStrikeAPISpecification, error)
- func LoadConfig(config interface{}) error
- func Start(f Handler)
- type APIError
- type BaseResponseV1
- type Config
- type ExecuteCommandRequestV1
- type ExecuteFunctionResultV1
- type ExecuteFunctionResultsV1
- type ExecuteFunctionV1
- type ExecuteOperationV1
- type Field
- type Handler
- type MetaInfo
- type Paging
- type Params
- type Request
- type Resources
- type Response
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConfigPointer is returned when attempting to load config into a non-pointer interface{} ErrConfigPointer = errors.New("config must be loaded into a pointer type") // ErrNoConfig indicates that no config env variable was provided. ErrNoConfig = fmt.Errorf("no value provided for %s", envFnConfigPath) // ErrFalconNoToken indicates that no access token was on the request handed to the FalconClient convenience function. ErrFalconNoToken = errors.New("falcon client requires an access token") )
Functions ¶
func FalconClient ¶
FalconClient returns a new instance of the GoFalcon client. If the client cannot be created or if there is no access token in the request, an error is returned.
func LoadConfig ¶
func LoadConfig(config interface{}) error
LoadConfig loads the configuration contents into the passed in interface type
Types ¶
type BaseResponseV1 ¶
type BaseResponseV1 struct {
Errors []APIError `json:"errors,omitempty"`
}
BaseResponseV1 is a basic response
type ExecuteCommandRequestV1 ¶
type ExecuteCommandRequestV1 struct {
Resources []ExecuteFunctionV1 `json:"resources" description:"List of functions to execute"`
}
ExecuteCommandRequestV1 stores information for execute command requests
type ExecuteFunctionResultV1 ¶
type ExecuteFunctionResultV1 struct { ID string `json:"id" description:"ID of the function that was executed in the format 'function_id:version.operation_id'."` StatusCode int `json:"status_code" description:"The response status code from the partner service."` Headers map[string][]string `json:"headers,omitempty" description:"The response headers from the partner service"` ResponseBody json.RawMessage `json:"response_body,omitempty" description:"The response body from the partner service"` }
ExecuteFunctionResultV1 is the response body for executing a function
type ExecuteFunctionResultsV1 ¶
type ExecuteFunctionResultsV1 struct { BaseResponseV1 Resources []ExecuteFunctionResultV1 `json:"resources"` }
ExecuteFunctionResultsV1 is the response body when executing a function
type ExecuteFunctionV1 ¶
type ExecuteFunctionV1 struct { ID string `json:"id" description:"ID of the function to execute, in the format 'function_id:version' or 'function_id'."` ConfigID string `json:"config_id" description:"ConfigID for the function to use."` Request Request `` /* 157-byte string literal not displayed */ }
ExecuteFunctionV1 holds request information to execute a function
type ExecuteOperationV1 ¶
type ExecuteOperationV1 struct { ID string `json:"id" description:"ID of the operation to execute, in the format 'operation_id:version' or 'operation_id'."` ConfigID string `json:"config_id" description:"ConfigID for the function to use."` Request Request `` /* 157-byte string literal not displayed */ }
ExecuteOperationV1 holds request information to execute an operation
type Field ¶
type Field struct { Name string `json:"name"` Display string `json:"display"` Kind string `json:"kind"` Value interface{} `json:"value"` }
Field is the metadata and value of a field from a workflow.
type MetaInfo ¶
type MetaInfo struct { QueryTime float64 `json:"query_time"` Paging *Paging `json:"pagination,omitempty"` Writes *Resources `json:"writes,omitempty"` Attribution string `json:"powered_by,omitempty"` TraceID string `json:"trace_id"` }
MetaInfo metadata for MSA reply
type Paging ¶
type Paging struct { Offset int `json:"offset"` Limit int `json:"limit"` Total int64 `json:"total"` }
Paging paging meta
type Params ¶
type Params struct { Header http.Header `json:"header,omitempty"` Query url.Values `json:"query,omitempty"` }
Params represents the request params
type Request ¶
type Request struct { Body json.RawMessage `json:"body,omitempty"` Params *Params `json:"params,omitempty"` URL string `json:"url"` Method string `json:"method"` Context json.RawMessage `json:"context,omitempty"` AccessToken string `json:"access_token,omitempty"` }
Request is a default fdk request