api

package
v0.0.0-...-9e5c185 Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrowdAPI

type CrowdAPI struct {
	DB       CrowdDatabase
	Interval time.Duration
	// contains filtered or unexported fields
}

func CreateCrowdAPI

func CreateCrowdAPI(db CrowdDatabase, options ...Option) *CrowdAPI

func (*CrowdAPI) GetCrowd

func (c *CrowdAPI) GetCrowd(ctx echo.Context) error

func (*CrowdAPI) GetTotalSniffedMACDaily

func (c *CrowdAPI) GetTotalSniffedMACDaily(ctx echo.Context) error

type CrowdDatabase

type CrowdDatabase interface {
	PacketDatabase
}

type CrowdParams

type CrowdParams struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*CrowdAPI)

func SetCrowdCalculationInterval

func SetCrowdCalculationInterval(interval time.Duration) Option

func SetCrowdClock

func SetCrowdClock(clock clock.Clock) Option

type PacketAPI

type PacketAPI struct {
	DB PacketDatabase
}

func (*PacketAPI) CreatePacket

func (p *PacketAPI) CreatePacket(ctx echo.Context) error

func (*PacketAPI) CreatePackets

func (p *PacketAPI) CreatePackets(ctx echo.Context) error

type PacketDatabase

type PacketDatabase interface {
	CreatePacket(packet *model.Packet) error
	GetPacketsBySniffer(snifferMAC string) []model.Packet
	GetPacketsBySnifferSince(snifferMAC string, since int64) []model.Packet
	GetPacketsBySnifferBetweenDates(snifferMAC string, from, until int64) []model.Packet
	GetUniqueMACCountBySnifferBetweenDates(snifferMAC string, from, until int64) int
}

type RouterAPI

type RouterAPI struct {
	DB RouterDatabase
}

func (*RouterAPI) CreateRouters

func (r *RouterAPI) CreateRouters(ctx echo.Context) error

func (*RouterAPI) GetRouters

func (r *RouterAPI) GetRouters(ctx echo.Context) error

type RouterDatabase

type RouterDatabase interface {
	CreateRouter(router *model.Router) error
	GetRoutersBySniffer(snifferMAC string) []model.Router
}

type SnifferAPI

type SnifferAPI struct {
	DB SnifferDatabase
}

func (*SnifferAPI) CreateSniffer

func (s *SnifferAPI) CreateSniffer(ctx echo.Context) error

func (*SnifferAPI) GetSniffers

func (s *SnifferAPI) GetSniffers(ctx echo.Context) error

func (*SnifferAPI) UpdateSniffer

func (s *SnifferAPI) UpdateSniffer(ctx echo.Context) error

type SnifferDatabase

type SnifferDatabase interface {
	CreateSniffer(sniffer *model.Sniffer) error
	GetSniffers() []model.Sniffer
	UpdateSniffer(sniffer *model.Sniffer) error
}

type TimeAPI

type TimeAPI struct {
	Clock clock.Clock
}

func (*TimeAPI) GetTime

func (t *TimeAPI) GetTime(ctx echo.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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