plugin

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 14 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{

	ProtocolVersion:  1,
	MagicCookieKey:   "IDP_PLUGIN",
	MagicCookieValue: "be60172b-2526-432a-865c-12386998a714",
}

Handshake is a common handshake that is shared by plugin and host.

View Source
var PluginMap = plugin.PluginSet{
	"idp-plugin": &grpcplugin.PluginGRPC{},
}

PluginMap is the map of plugins we can dispense.

Functions

func Serve

func Serve(options *PluginOptions) error

Types

type AsertoPluginServer

type AsertoPluginServer struct {
	PluginHandler PluginHandler
}

func (AsertoPluginServer) Delete

func (AsertoPluginServer) Export

func (AsertoPluginServer) Import

func (AsertoPluginServer) Info

func (AsertoPluginServer) Validate

type OperationType

type OperationType int
const (
	OperationTypeRead OperationType = iota
	OperationTypeWrite
	OperationTypeDelete
)

type PluginConfig

type PluginConfig interface {
	Validate() error
	Description() string
}

type PluginHandler

type PluginHandler interface {
	GetConfig() PluginConfig
	Open(PluginConfig, OperationType) error
	Read() ([]*api.User, error)
	Write(*api.User) error
	Delete(string) error
	Close() (*Stats, error)
	GetVersion() (string, string, string)
}

type PluginOptions

type PluginOptions struct {
	PluginHandler PluginHandler
}

type Stats added in v0.0.3

type Stats struct {
	Received int32
	Created  int32
	Updated  int32
	Deleted  int32
	Errors   int32
}

Jump to

Keyboard shortcuts

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