Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONParsersByType = map[string]ServiceOptionsParser{ noop.ServiceType: noop.ParseJSONOptions, openvpn.ServiceType: openvpn_service.ParseJSONOptions, wireguard.ServiceType: wireguard_service.ParseJSONOptions, scraping.ServiceType: wireguard_service.ParseJSONOptions, datatransfer.ServiceType: wireguard_service.ParseJSONOptions, dvpn.ServiceType: wireguard_service.ParseJSONOptions, }
JSONParsersByType parsers of service specific options from JSON request.
Functions ¶
func IsTypeValid ¶
IsTypeValid returns true if a given string is valid service type.
func TypeConfiguredOptions ¶
TypeConfiguredOptions returns specific service options.
Types ¶
type ServiceOptionsParser ¶
type ServiceOptionsParser func(*json.RawMessage) (service.Options, error)
ServiceOptionsParser parses request to service specific options
func TypeJSONParser ¶
func TypeJSONParser(serviceType string) (ServiceOptionsParser, error)
TypeJSONParser get parser to parse service specific options from JSON request.
type StartOptions ¶
StartOptions describes options shared among multiple services
func GetStartOptions ¶
func GetStartOptions(serviceType string) (opts StartOptions, err error)
GetStartOptions returns options to use for starting a service.
Click to show internal directories.
Click to hide internal directories.