plugins

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatedFile

func DatedFile(path, name string) (*os.File, time.Time)

func FormatLog

func FormatLog(f *os.File, t time.Time, indicator, message string)

func KeyValueStrings

func KeyValueStrings(packet *radius.Packet) []string

Get attributes as Type/Value string arrays

Types

type Accounting

type Accounting interface {
	Module
	Account(*radius.Packet)
}

type Authing

type Authing interface {
	Module
	Auth(*radius.Packet)
}

type Module

type Module interface {
	Reload()
	Setup(*PluginContext)
	Name() string
}

func LoadPlugin

func LoadPlugin(path string, ctx *PluginContext) (Module, error)

type PluginContext

type PluginContext struct {
	// Location of logs directory
	Logs string
	// Location of the general lib directory
	Lib string
	// Backing config
	Config *goutils.Config
}

type PreAuth

type PreAuth interface {
	Module
	Pre(*radius.Packet) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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