controllers

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIpsFromIpRange

func GetIpsFromIpRange(host string) (int64, int64, error)

func IP2Int

func IP2Int(ip net.IP) uint32

func Int2ip

func Int2ip(nn uint32) net.IP

func IsIpv4

func IsIpv4(host string) bool

func LastAddress

func LastAddress(n *net.IPNet) net.IP

Stolen from : https://github.com/llimllib/ipaddress/ Return the final address of a net range. Convert to IPv4 if possible, otherwise return an ipv6

Types

type Controller

type Controller struct {
	Ectx     context.Context
	DBClient *database.Client
	Router   *gin.Engine
	Profiles []*csconfig.ProfileCfg
	CAPIChan chan []*models.Alert
	Log      *log.Logger
}

func (*Controller) Init

func (c *Controller) Init() error

func (*Controller) NewV1

func (c *Controller) NewV1() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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