plugins

package
v0.0.0-...-3a156e7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleServerPlugins

func HandleServerPlugins(d *webrtc.DataChannel)

func ModifyArgs

func ModifyArgs(pluginName string, args []Plugin_arg, mode string)

ModifyArgs will modify the arguments of a plugin mode can be "init_client", "init_host" or "background"

func ReloadPlugins

func ReloadPlugins()

ReloadPlugins will reload the plugins from the json file

Types

type NATS_PORT

type NATS_PORT struct {
	// contains filtered or unexported fields
}
var MessagingPort NATS_PORT

func (NATS_PORT) Get

func (m NATS_PORT) Get() uint16

type Plugin

type Plugin struct {
	Name string `json:"name"`
	Path string `json:"path"`

	Init_client_args []Plugin_arg `json:"init_client_args"`

	Init_host_args []Plugin_arg `json:"init_host_args"`

	Background_args []Plugin_arg `json:"background_args"`
	Enabled         bool         `json:"enabled"`
	// contains filtered or unexported fields
}

func GetPlugins

func GetPlugins() []Plugin

func (Plugin) Background

func (p Plugin) Background(comms_port uint16) (uintptr, error)

Background will get the input arguments from the struct populated by the json file and will return the result of the function

func (Plugin) Init_client

func (p Plugin) Init_client(comms_port uint16) (uintptr, error)

Init client will get the input arguments from the struct populated by the json file and will return the result of the function

func (Plugin) Init_host

func (p Plugin) Init_host(comms_port uint16) (uintptr, error)

Init server will get the input arguments from the struct populated by the json file and will return the result of the function

func (Plugin) IsEnabled

func (p Plugin) IsEnabled() bool

func (Plugin) PersistPlugin

func (p Plugin) PersistPlugin()

func (*Plugin) ReloadArgs

func (p *Plugin) ReloadArgs()

func (*Plugin) Toogle

func (p *Plugin) Toogle()

type Plugin_arg

type Plugin_arg struct {
	Name      string       `json:"name"`
	Value     any          `json:"value"`
	ValueList []Plugin_arg `json:"value_list,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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