Documentation ¶
Index ¶
- func GetBlockedRouteHelper() (*blockroutehelper, error)
- func GetConnectionHelper() (*connectionhelper, error)
- func GetDeviceHelper() (*devicehelper, error)
- func GetFilterCollectionHelper() (*filtercollectionhelper, error)
- func GetLeaseHelper() (*leasehelper, error)
- func GetUserFilterCollectionsHelper() (*userfiltercollectionhelper, error)
- func GetUserHelper() (*userhelper, error)
- type BlockedRoute
- type ClassifiedConnection
- type Connection
- func (t *Connection) AddPacket(packet []byte) error
- func (t *Connection) DestinationIP() net.IP
- func (t *Connection) DestinationPort() uint16
- func (t *Connection) DeviceID() net.HardwareAddr
- func (t *Connection) NumberOfPackets() int
- func (t *Connection) Packets() [][]byte
- func (t *Connection) SourceIP() net.IP
- func (t *Connection) SourcePort() uint16
- func (t *Connection) Updated() time.Time
- func (t *Connection) Username() string
- type Connections
- type Device
- type FilterCollection
- type User
- func (this *User) GetDisplayName() string
- func (this *User) IsDefaultUserForDevice(device Device) bool
- func (t User) MarshalJSON() ([]byte, error)
- func (this *User) NumberOfFilterCollections() (int, error)
- func (this *User) SetShortDOB(shortFormat string) error
- func (this *User) ShortDOB() string
- func (t *User) UnmarshalJSON(data []byte) error
- func (this *User) UserFilterCollections() (UserFilterCollections, error)
- type UserFilterCollections
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockedRouteHelper ¶
func GetBlockedRouteHelper() (*blockroutehelper, error)
func GetConnectionHelper ¶
func GetConnectionHelper() (*connectionhelper, error)
func GetDeviceHelper ¶
func GetDeviceHelper() (*devicehelper, error)
func GetFilterCollectionHelper ¶
func GetFilterCollectionHelper() (*filtercollectionhelper, error)
func GetLeaseHelper ¶
func GetLeaseHelper() (*leasehelper, error)
func GetUserFilterCollectionsHelper ¶
func GetUserFilterCollectionsHelper() (*userfiltercollectionhelper, error)
func GetUserHelper ¶
func GetUserHelper() (*userhelper, error)
Types ¶
type BlockedRoute ¶
func (*BlockedRoute) AsBytes ¶
func (t *BlockedRoute) AsBytes() []byte
type ClassifiedConnection ¶
type ClassifiedConnection struct { Connection // contains filtered or unexported fields }
func NewClassifiedConnection ¶
func NewClassifiedConnection(c Connection) (ClassifiedConnection, error)
func (*ClassifiedConnection) Classisications ¶
func (t *ClassifiedConnection) Classisications() []packetclassification.Classification
func (*ClassifiedConnection) Protocol ¶
func (t *ClassifiedConnection) Protocol() string
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func GetExampleConnections ¶
func GetExampleConnections() []Connection
func NewConnectionFromPacket ¶
func NewConnectionFromPacket(packet []byte) (Connection, error)
func (*Connection) AddPacket ¶
func (t *Connection) AddPacket(packet []byte) error
func (*Connection) DestinationIP ¶
func (t *Connection) DestinationIP() net.IP
func (*Connection) DestinationPort ¶
func (t *Connection) DestinationPort() uint16
func (*Connection) DeviceID ¶
func (t *Connection) DeviceID() net.HardwareAddr
func (*Connection) NumberOfPackets ¶
func (t *Connection) NumberOfPackets() int
func (*Connection) Packets ¶
func (t *Connection) Packets() [][]byte
func (*Connection) SourceIP ¶
func (t *Connection) SourceIP() net.IP
func (*Connection) SourcePort ¶
func (t *Connection) SourcePort() uint16
func (*Connection) Updated ¶
func (t *Connection) Updated() time.Time
func (*Connection) Username ¶
func (t *Connection) Username() string
type Connections ¶
type Connections []Connection
func (Connections) ConnectionsForUsernameAndDeviceID ¶
func (t Connections) ConnectionsForUsernameAndDeviceID(username, deviceid string) []Connection
func (Connections) DeviceIDs ¶
func (t Connections) DeviceIDs() []net.HardwareAddr
func (Connections) DeviceIDsForUsername ¶
func (t Connections) DeviceIDsForUsername(username string) []net.HardwareAddr
func (Connections) Usernames ¶
func (t Connections) Usernames() []string
type Device ¶
type Device struct { MACAddress net.HardwareAddr IPAddress net.IP Hostname string Nickname string CurrentUser *User DefaultUser *User }
MACAddress Is the Primary Key IPAddress Is Needed as a Lookup [IPAddress -> MACAddress] (Things from the Kernel have the IP)
func (Device) DisplayName ¶
func (*Device) GetActiveUser ¶
* Get the Current Username (CurrentUser, Default User if Blank and blank if both blank)
func (*Device) GetDisplayName ¶
*
- Returns the display name for this device.
- If there is a Nickname present, returns that, otherwise return the hostname.
func (Device) MarshalJSON ¶
func (*Device) UnmarshalJSON ¶
type FilterCollection ¶
type FilterCollection struct { Name string //Collection Name Domains []string // Usually domains but should also be ok for IPs }
func (*FilterCollection) EscapedName ¶
func (this *FilterCollection) EscapedName() string
*
- Returns a HTML safe escaped version of the name of this collection.
func (*FilterCollection) GetNumberOfDomains ¶
func (this *FilterCollection) GetNumberOfDomains() int
*
- Returns the number of domains on this collection.
type User ¶
type User struct { Username string Password string DisplayName string IsAdmin bool //So we're starting with Admin & User only (I'm sure this will change one day) DOB time.Time //DOB YYYY-MM-DD }
func (*User) GetDisplayName ¶
*
- Returns the display name for this user.
- If there is a DisplayName present, returns that, otherwise return the Username.
func (*User) IsDefaultUserForDevice ¶
*
- Identifies if this user is the default user for the given device.
func (User) MarshalJSON ¶
func (*User) NumberOfFilterCollections ¶
*
- Returns the number of filter collections assigned to this user.
func (*User) UnmarshalJSON ¶
func (*User) UserFilterCollections ¶
func (this *User) UserFilterCollections() (UserFilterCollections, error)
*
- Gets and returns the UserFilterCollections related to this user.
type UserFilterCollections ¶
type UserFilterCollections struct { Username string Collections []string //Array Of Collection Names... }
func (*UserFilterCollections) ContainsCollection ¶
func (t *UserFilterCollections) ContainsCollection(searchCollectionName string) bool
func (*UserFilterCollections) NumberOfCollections ¶
func (this *UserFilterCollections) NumberOfCollections() int
*
- Returns the number of collections.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.