db

package
v0.0.0-...-2b140d7 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDnsRequest

func AddDnsRequest(cbName string, queryName string, queryType string, srcIP string)

func AddHttpRequest

func AddHttpRequest(cbName string, uri string, host string, method string, headers string, body string, srcIP string)

these should be base64 encoded before coming into this function

Types

type Callback

type Callback struct {
	gorm.Model
	Name string
}

func CreateCallback

func CreateCallback(cbName string) *Callback

func GetCallback

func GetCallback(cbName string) *Callback

type DnsRequest

type DnsRequest struct {
	gorm.Model
	SourceIP   string
	QueryName  string
	QueryType  string
	CallbackID int // fkey to callback
	Callback   Callback
}

func GetDnsRequests

func GetDnsRequests(cbName string, since *time.Time) []DnsRequest

type HttpRequest

type HttpRequest struct {
	gorm.Model
	SourceIP   string
	URI        string
	Host       string
	Method     string
	Headers    string // base64
	Body       string // base64
	CallbackID int    // fkey to callback
	Callback   Callback
}

func GetHttpRequests

func GetHttpRequests(cbName string, since *time.Time) []HttpRequest

Jump to

Keyboard shortcuts

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