Documentation ¶
Index ¶
- func CleanPack(filename string) (string, error)
- func ConfirmAction(prompt string) bool
- func GetValueFromUser(prompt string) (string, error)
- type HandleTester
- type MockDB
- func (m MockDB) APIGetPackQueries() ([]osquery_types.PackQuery, error)
- func (m MockDB) APISearchPackQueries(searchString string) ([]osquery_types.PackQuery, error)
- func (m MockDB) AddCarveData(data *osquery_types.CarveData) error
- func (m MockDB) AppendDistributedQuery(dq osquery_types.DistributedQuery) error
- func (m MockDB) ApprovePendingNode(nodeKey string) error
- func (m MockDB) BuildNamedConfig(configName string) (osquery_types.OsqueryNamedConfig, error)
- func (m MockDB) BuildOsqueryPackAsJSON(nc osquery_types.OsqueryNamedConfig) json.RawMessage
- func (m MockDB) CarveDataExists(data *osquery_types.CarveData) (bool, error)
- func (m MockDB) CreateCarve(carveMap *osquery_types.Carve) error
- func (m MockDB) DeleteDistributedQuery(dq osquery_types.DistributedQuery) error
- func (m MockDB) DeleteNodeByNodekey(nodeKey string) error
- func (m MockDB) DeleteQueryPack(queryPackName string) error
- func (m MockDB) GetNamedConfig(cn string) (osquery_types.OsqueryNamedConfig, error)
- func (m MockDB) GetNamedConfigs() ([]osquery_types.OsqueryNamedConfig, error)
- func (m MockDB) GetPackByName(packName string) (osquery_types.Pack, error)
- func (m MockDB) GetPackQuery(queryName string) (osquery_types.PackQuery, error)
- func (m MockDB) GetUser(username string) (osquery_types.User, error)
- func (m MockDB) NewDistributedQuery(dq osquery_types.DistributedQuery) error
- func (m MockDB) NewQueryPack(qp osquery_types.QueryPack) error
- func (m MockDB) NewUser(u osquery_types.User) error
- func (m MockDB) SearchByHostIdentifier(hid string) ([]osquery_types.OsqueryClient, error)
- func (m MockDB) SearchByNodeKey(nk string) (osquery_types.OsqueryClient, error)
- func (m MockDB) SearchDistributedNodeKey(nk string) (osquery_types.DistributedQuery, error)
- func (m MockDB) SearchQueryPacks(searchString string) ([]osquery_types.QueryPack, error)
- func (m MockDB) UpsertClient(oc osquery_types.OsqueryClient) error
- func (m MockDB) UpsertDistributedQuery(dq osquery_types.DistributedQuery) error
- func (m MockDB) UpsertNamedConfig(nc *osquery_types.OsqueryNamedConfig) error
- func (m MockDB) UpsertPack(qp osquery_types.QueryPack) error
- func (m MockDB) UpsertPackQuery(pq osquery_types.PackQuery) error
- func (m MockDB) ValidNode(nodeKey string) error
- type OsqueryPack
- type PackQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfirmAction ¶
ConfirmAction scans user input for a yes or no confirmation
func GetValueFromUser ¶
GetValueFromUser prompts the user to provide a value
Types ¶
type HandleTester ¶
type HandleTester func(method, url string, params url.Values, body io.Reader) *httptest.ResponseRecorder
func GenerateHandleTester ¶
func GenerateHandleTester(t *testing.T, handleFunc http.Handler) HandleTester
type MockDB ¶
type MockDB struct { }
func (MockDB) APIGetPackQueries ¶
func (m MockDB) APIGetPackQueries() ([]osquery_types.PackQuery, error)
func (MockDB) APISearchPackQueries ¶
func (m MockDB) APISearchPackQueries(searchString string) ([]osquery_types.PackQuery, error)
func (MockDB) AddCarveData ¶
func (m MockDB) AddCarveData(data *osquery_types.CarveData) error
func (MockDB) AppendDistributedQuery ¶
func (m MockDB) AppendDistributedQuery(dq osquery_types.DistributedQuery) error
func (MockDB) ApprovePendingNode ¶
func (MockDB) BuildNamedConfig ¶
func (m MockDB) BuildNamedConfig(configName string) (osquery_types.OsqueryNamedConfig, error)
func (MockDB) BuildOsqueryPackAsJSON ¶
func (m MockDB) BuildOsqueryPackAsJSON(nc osquery_types.OsqueryNamedConfig) json.RawMessage
func (MockDB) CarveDataExists ¶
func (m MockDB) CarveDataExists(data *osquery_types.CarveData) (bool, error)
func (MockDB) CreateCarve ¶
func (m MockDB) CreateCarve(carveMap *osquery_types.Carve) error
func (MockDB) DeleteDistributedQuery ¶
func (m MockDB) DeleteDistributedQuery(dq osquery_types.DistributedQuery) error
func (MockDB) DeleteNodeByNodekey ¶
func (MockDB) DeleteQueryPack ¶
func (MockDB) GetNamedConfig ¶
func (m MockDB) GetNamedConfig(cn string) (osquery_types.OsqueryNamedConfig, error)
func (MockDB) GetNamedConfigs ¶
func (m MockDB) GetNamedConfigs() ([]osquery_types.OsqueryNamedConfig, error)
func (MockDB) GetPackByName ¶
func (m MockDB) GetPackByName(packName string) (osquery_types.Pack, error)
func (MockDB) GetPackQuery ¶
func (m MockDB) GetPackQuery(queryName string) (osquery_types.PackQuery, error)
func (MockDB) NewDistributedQuery ¶
func (m MockDB) NewDistributedQuery(dq osquery_types.DistributedQuery) error
func (MockDB) NewQueryPack ¶
func (m MockDB) NewQueryPack(qp osquery_types.QueryPack) error
func (MockDB) SearchByHostIdentifier ¶
func (m MockDB) SearchByHostIdentifier(hid string) ([]osquery_types.OsqueryClient, error)
func (MockDB) SearchByNodeKey ¶
func (m MockDB) SearchByNodeKey(nk string) (osquery_types.OsqueryClient, error)
func (MockDB) SearchDistributedNodeKey ¶
func (m MockDB) SearchDistributedNodeKey(nk string) (osquery_types.DistributedQuery, error)
func (MockDB) SearchQueryPacks ¶
func (m MockDB) SearchQueryPacks(searchString string) ([]osquery_types.QueryPack, error)
func (MockDB) UpsertClient ¶
func (m MockDB) UpsertClient(oc osquery_types.OsqueryClient) error
func (MockDB) UpsertDistributedQuery ¶
func (m MockDB) UpsertDistributedQuery(dq osquery_types.DistributedQuery) error
func (MockDB) UpsertNamedConfig ¶
func (m MockDB) UpsertNamedConfig(nc *osquery_types.OsqueryNamedConfig) error
func (MockDB) UpsertPack ¶
func (m MockDB) UpsertPack(qp osquery_types.QueryPack) error
func (MockDB) UpsertPackQuery ¶
func (m MockDB) UpsertPackQuery(pq osquery_types.PackQuery) error
type OsqueryPack ¶
type OsqueryPack struct { Queries map[string]PackQuery `json:"queries"` Platform string `json:"platform"` }
func (OsqueryPack) ListQueries ¶
func (op OsqueryPack) ListQueries() []string
Click to show internal directories.
Click to hide internal directories.