lib

package
v0.0.0-...-49d52ff Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_PATH string = "/var/log/ngk.log"
)

Variables

This section is empty.

Functions

func DecryptAES

func DecryptAES(key []byte, encrypted string) (string, error)

func LogInIt

func LogInIt()

Types

type ClientConfig

type ClientConfig struct {
	Name          string `mapstructure:"name"`
	SourceAddress string `mapstructure:"source_address"`
	SigningKey    string `mapstructure:"signing_key"`
	EncryptionKey string `mapstructure:"encryption_key"`
	ServiceAccess string `mapstructure:"service_access"`
}

func LoadClientConfig

func LoadClientConfig() (arrayClientConfig []ClientConfig, err error)

type Config

type Config struct {
	Device                 string `mapstructure:"DEVICE"`
	Protocol               string `mapstructure:"PROTOCOL"`
	Port                   string `mapstructure:"PORT"`
	Snapshot_len           int    `mapstructure:"SNAPSHOT_LEN"`
	Promiscuous            bool   `mapstructure:"PROMISCUOUS"`
	Timeout                int    `mapstructure:"TIMEOUT"`
	ClientConf             string `mapstructure:"CLIENT_CONFIG"`
	IptablesTablename      string `mapstructure:"IPTABLES_NAME"`
	IptablesChain          string `mapstructure:"IPTABLES_CHAIN"`
	RuleExpires            int    `mapstructure:"RULE_EXPIRES"`
	LogPath                string `mapstructure:"LOG_PATH"`
	IptablesAccessRuleConf string `mapstructure:"IPTABLES_ACCESS_RULE_REGEX"`
}

func LoadConfig

func LoadConfig(path string) (config Config, err error)

type SPAServerHandler

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

func (SPAServerHandler) Init

func (SPAServerHandler) Init()

Jump to

Keyboard shortcuts

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