go_dvpn

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 20 Imported by: 0

README

go-dvpn

go-dvpn is lightweight go wrapper for Dockovpn container. It provides API for Dockovpn container discovery and commands exposed by container.

Supported Dockovpn versions

Dockovpn 1.13.0 and newer.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands cmds

Functions

func CleanString

func CleanString(in string) string

func GetAuthToken

func GetAuthToken(creds RegistryCreds) string

Types

type Command

type Command []string

type DvpnContainerOptions

type DvpnContainerOptions struct {
	ImageUrl      string
	ContainerName string
}

type DvpnInterface

type DvpnInterface interface {
	Start(dvpnContainerOpts DvpnContainerOptions, registryCreds RegistryCreds, opts StartOptions) (VolumeRemoveHandle, error)
	StartWithPersistentVolume(dvpnContainerOpts DvpnContainerOptions, volumeName string, registryCreds RegistryCreds, opts StartOptions) (VolumeRemoveHandle, error)
	GetClient(clientId string) (string, error)
	ListClients() (string, error)
	Version() (string, error)
	GenerateClient() (string, error)
	GenerateClientWithID(clientId string) (string, error)
	RemoveClient(clientId string) (string, error)
	Close()
}

func FindInstance

func FindInstance(containerName string) DvpnInterface

func NewDockovpn

func NewDockovpn() DvpnInterface

type ExecOptions

type ExecOptions struct {
}

type RegistryCreds

type RegistryCreds struct {
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	Email         string `json:"email,omitempty"`
	Serveraddress string `json:"serveraddress,omitempty"`
}

type StartOptions

type StartOptions struct {
	Regenerate bool
	Skip       bool
	Noop       bool
	Quit       bool
}

type VolumeRemoveHandle

type VolumeRemoveHandle interface {
	Remove()
}

func NewVolumeRemoveHandle

func NewVolumeRemoveHandle(dvpn DvpnInterface, dockerClient *client.Client, volumeId string) VolumeRemoveHandle

Jump to

Keyboard shortcuts

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