Documentation ¶
Index ¶
Constants ¶
View Source
const DESTINATIONS_TABLE_NAME = "destinations"
Variables ¶
This section is empty.
Functions ¶
func LoggerWithLevel ¶
func LoggerWithLevel(levelStr string) *logging.Logger
Types ¶
type AbstractGarinDB ¶
type AbstractGarinDB struct {
// contains filtered or unexported fields
}
func (*AbstractGarinDB) Close ¶
func (self *AbstractGarinDB) Close()
func (*AbstractGarinDB) Open ¶
func (self *AbstractGarinDB) Open()
func (*AbstractGarinDB) RecordDestination ¶
func (self *AbstractGarinDB) RecordDestination(destination *Destination)
func (*AbstractGarinDB) Setup ¶
func (self *AbstractGarinDB) Setup(dbType string, dbArgs string)
type Destination ¶
type Destination struct { SourceIp string `db:"source_ip"` DestinationIp string `db:"destination_ip"` ServerName string `db:"server_name"` Protocol string `db:"protocol"` Timestamp time.Time `db:"timestamp"` }
func NewDestination ¶
func NewDestination(serverName string, sourceIp string, destIp string) *Destination
func (*Destination) Hash ¶
func (self *Destination) Hash() string
func (*Destination) Save ¶
func (self *Destination) Save(db GarinDB)
type GarinDB ¶
type GarinDB interface { Setup(string, string) Open() Close() RecordDestination(*Destination) }
func NewGarinDB ¶
type MongoGarinDB ¶
type MongoGarinDB struct { AbstractGarinDB Session *mgo.Session }
func (*MongoGarinDB) Close ¶
func (self *MongoGarinDB) Close()
func (*MongoGarinDB) Open ¶
func (self *MongoGarinDB) Open()
func (*MongoGarinDB) RecordDestination ¶
func (self *MongoGarinDB) RecordDestination(destination *Destination)
type SQLGarinDB ¶
type SQLGarinDB struct { AbstractGarinDB Handle *sqlx.DB }
func (*SQLGarinDB) Close ¶
func (self *SQLGarinDB) Close()
func (*SQLGarinDB) Open ¶
func (self *SQLGarinDB) Open()
func (*SQLGarinDB) RecordDestination ¶
func (self *SQLGarinDB) RecordDestination(destination *Destination)
Click to show internal directories.
Click to hide internal directories.