dyndb

package
v0.0.0-...-d58163c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2020 License: GPL-3.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbInstance

func DbInstance() *dynamodb.DynamoDB

DbInstance creates a new pointer to dynamodb from assumed role by ec2 instance

func GetNamedConfigs

func GetNamedConfigs(dynamoDB *dynamodb.DynamoDB) ([]osq_types.OsqueryNamedConfig, error)

func GetPackByName

func GetPackByName(s string, db *dynamodb.DynamoDB) (string, error)

GetPackByName returns pack specified by name

func NewUser

func NewUser(u osq_types.User, dynamoDB *dynamodb.DynamoDB) error

NewUser creates new user in DB

func UpsertNamedConfig

func UpsertNamedConfig(dynamoDB *dynamodb.DynamoDB, onc *osq_types.OsqueryNamedConfig) error

func ValidNode

func ValidNode(nodeKey string, dyn *dynamodb.DynamoDB) error

ValidNode returns if a node is valid or note, specified by nodeKey

Types

type DynDB

type DynDB struct {
	DB *dynamodb.DynamoDB
}

func NewDynamoDB

func NewDynamoDB() DynDB

func (DynDB) APIGetPackQueries

func (db DynDB) APIGetPackQueries() ([]osq_types.PackQuery, error)

func (DynDB) APISearchPackQueries

func (db DynDB) APISearchPackQueries(searchString string) ([]osq_types.PackQuery, error)

func (DynDB) AddCarveData

func (dyn DynDB) AddCarveData(data *osquery_types.CarveData) error

func (DynDB) AppendDistributedQuery

func (dyn DynDB) AppendDistributedQuery(dq osq_types.DistributedQuery) error

func (DynDB) ApprovePendingNode

func (db DynDB) ApprovePendingNode(nodeKey string) error

func (DynDB) BuildNamedConfig

func (db DynDB) BuildNamedConfig(configName string) (osq_types.OsqueryNamedConfig, error)

func (DynDB) CarveDataExists

func (dyn DynDB) CarveDataExists(data *osquery_types.CarveData) (bool, error)

func (DynDB) CreateCarve

func (dyn DynDB) CreateCarve(carveMap *osquery_types.Carve) error

func (DynDB) DeleteDistributedQuery

func (dyn DynDB) DeleteDistributedQuery(dq osq_types.DistributedQuery) error

func (DynDB) DeleteNodeByNodekey

func (db DynDB) DeleteNodeByNodekey(nodeKey string) error

func (DynDB) DeleteQueryPack

func (dyn DynDB) DeleteQueryPack(queryPackName string) error

func (DynDB) GetNamedConfig

func (db DynDB) GetNamedConfig(configName string) (osq_types.OsqueryNamedConfig, error)

func (DynDB) GetNamedConfigs

func (db DynDB) GetNamedConfigs() ([]osq_types.OsqueryNamedConfig, error)

GetNamedConfigs returns all named configs

func (DynDB) GetPackByName

func (dyn DynDB) GetPackByName(packName string) (osq_types.Pack, error)

func (DynDB) GetPackQuery

func (db DynDB) GetPackQuery(queryName string) (osq_types.PackQuery, error)

func (DynDB) GetUser

func (dyn DynDB) GetUser(username string) (osq_types.User, error)

func (DynDB) NewDistributedQuery

func (dyn DynDB) NewDistributedQuery(dq osq_types.DistributedQuery) error

func (DynDB) NewQueryPack

func (dyn DynDB) NewQueryPack(qp osq_types.QueryPack) error

func (DynDB) NewUser

func (dyn DynDB) NewUser(u osq_types.User) error

func (DynDB) SearchByHostIdentifier

func (db DynDB) SearchByHostIdentifier(hid string) ([]osq_types.OsqueryClient, error)

func (DynDB) SearchByNodeKey

func (db DynDB) SearchByNodeKey(nk string) (osq_types.OsqueryClient, error)

func (DynDB) SearchDistributedNodeKey

func (dyn DynDB) SearchDistributedNodeKey(nk string) (osq_types.DistributedQuery, error)

func (DynDB) SearchQueryPacks

func (dyn DynDB) SearchQueryPacks(searchString string) ([]osq_types.QueryPack, error)

func (DynDB) UpsertClient

func (db DynDB) UpsertClient(oc osq_types.OsqueryClient) error

UpsertClient upsers an osqueryClient

func (DynDB) UpsertDistributedQuery

func (dyn DynDB) UpsertDistributedQuery(dq osq_types.DistributedQuery) error

func (DynDB) UpsertNamedConfig

func (db DynDB) UpsertNamedConfig(onc *osq_types.OsqueryNamedConfig) error

UpsertNamedConfig upserts named config to dynamo db. Returns true if successful, else false

func (DynDB) UpsertPack

func (dyn DynDB) UpsertPack(qp osq_types.QueryPack) error

func (DynDB) UpsertPackQuery

func (dyn DynDB) UpsertPackQuery(pq osq_types.PackQuery) error

func (DynDB) ValidNode

func (db DynDB) ValidNode(nodeKey string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL