plugins

package
v0.0.0-...-2a83efa Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPlugins

func HasPlugins() bool

HasPlugins if any plugin is available to send data to

func InitPlugins

func InitPlugins()

InitPlugins initialize plugins in given plugin directory

func LoginAudit

func LoginAudit(method string, status string, session *auth.SessionInfo, user *auth.UserInfo)

LoginAudit login audit

func ReceiveAudit

func ReceiveAudit(p *clu.Context, r *http.Request)

ReceiveAudit send audit information to plugins

func SendAdabasPlugins

func SendAdabasPlugins(used time.Duration, ada interface{})

SendAdabasPlugins send adabas information to plugins

func SendAuditEnded

func SendAuditEnded(started time.Time, r *http.Request)

SendAuditEnded send audit information to plugins

func SendAuditError

func SendAuditError(started time.Time, r *http.Request, err error)

SendAuditError send audit errors to plugins

func ShutdownPlugins

func ShutdownPlugins()

ShutdownPlugins shutdown receiving message in plugins

Types

type Adabas

type Adabas interface {
	SendAdabas(time.Duration, interface{})
}

Adabas Adabas method to send to plugin

type AdabasLoader

type AdabasLoader struct {
	Loader Loader
	Adabas Adabas
}

AdabasLoader adabas plugin loader structure

type Audit

type Audit interface {
	LoginAudit(string, string, *auth.SessionInfo, *auth.UserInfo)
	ReceiveAudit(string, string, *http.Request)
	SendAudit(time.Duration, string, string, *http.Request)
	SendAuditError(time.Duration, string, string, *http.Request, error)
}

Audit auditing method to send to plugin

type AuditLoader

type AuditLoader struct {
	Loader Loader
	Audit  Audit
}

AuditLoader auditing loader structure

type ExtendLoader

type ExtendLoader struct {
	Loader Loader
	Extend server.RestExtend
}

AdabasLoader adabas plugin loader structure

type Loader

type Loader interface {
	Name() string
	Version() string
	Types() []int
	Stop()
}

Loader plugin Loader module to load plugin features

type PluginTypes

type PluginTypes int

PluginTypes different types of plugins for - auditing - database operation

const (
	// NoPlugin no plugin but may be used in module
	NoPlugin PluginTypes = iota
	// AuditPlugin auditing of RESTful server access
	AuditPlugin
	// AdabasPlugin Adabas plugin type
	AdabasPlugin
	// AuthPlugin authorize and authorize
	AuthPlugin
	// ExtendPlugin extend entry point "/rest/extend"
	ExtendPlugin
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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