db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 36

README

DB

GORM-based database interactions.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client = newDBClient()

Client - Database Client

View Source
var (
	// ErrRecordNotFound - Record not found error
	ErrRecordNotFound = gorm.ErrRecordNotFound
)

Functions

func CanaryByDomain

func CanaryByDomain(domain string) (*models.DNSCanary, error)

CanaryByDomain - Check if a canary exists

func ImplantBuildByName

func ImplantBuildByName(name string) (*models.ImplantBuild, error)

ImplantBuildByName - Fetch implant build by name

func ImplantBuildNames

func ImplantBuildNames() ([]string, error)

ImplantBuildNames - Fetch a list of all build names

func ImplantBuilds

func ImplantBuilds() ([]*models.ImplantBuild, error)

ImplantBuilds - Return all implant builds

func ImplantProfileByName

func ImplantProfileByName(name string) (*models.ImplantProfile, error)

ImplantProfileByName - Fetch implant build by name

func ImplantProfileNames

func ImplantProfileNames() ([]string, error)

ImplantProfileNames - Fetch a list of all build names

func ImplantProfiles

func ImplantProfiles() ([]*models.ImplantProfile, error)

ImplantProfiles - Fetch a map of name<->profiles current in the database

func ListCanaries

func ListCanaries() ([]*models.DNSCanary, error)

ListCanaries - List of all embedded canaries

func ProfileByName

func ProfileByName(name string) (*models.ImplantProfile, error)

ProfileByName - Fetch a single profile from the database

func Session

func Session() *gorm.DB

Session - Database session

func WebsiteByName

func WebsiteByName(name string) (*models.Website, error)

WebsiteByName - Get website by name

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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