share

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: GPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultListenIPStr

func GetDefaultListenIPStr() string

func IsSMBExtModeDefault

func IsSMBExtModeDefault() bool

func NewAFPBackend

func NewAFPBackend(uc *UserConfiguration) (Backend, *VMShareOptions, error)

func NewFTPBackend

func NewFTPBackend(uc *UserConfiguration) (Backend, *VMShareOptions, error)

func NewSMBBackend

func NewSMBBackend(uc *UserConfiguration) (Backend, *VMShareOptions, error)

Types

type AFPBackend

type AFPBackend struct {
	// contains filtered or unexported fields
}

func (*AFPBackend) Apply

func (b *AFPBackend) Apply(sharePWD string, vc *VMShareContext) (string, error)

type Backend

type Backend interface {
	Apply(sharePWD string, vc *VMShareContext) (string, error)
}

type FTPBackend

type FTPBackend struct {
	// contains filtered or unexported fields
}

func (*FTPBackend) Apply

func (b *FTPBackend) Apply(sharePWD string, vc *VMShareContext) (string, error)

type NetTapRuntimeContext

type NetTapRuntimeContext struct {
	Manager *nettap.TapManager
	Name    string
	Net     nettap.TapNet
}

type NewBackendFunc

type NewBackendFunc func(uc *UserConfiguration) (Backend, *VMShareOptions, error)

func GetBackend

func GetBackend(id string) NewBackendFunc

Will return nil if no backend is found.

type RawUserConfiguration

type RawUserConfiguration struct {
	ListenIP string

	// Backend-specific
	FTPExtIP   string
	SMBExtMode bool
}

func (RawUserConfiguration) Process

func (rc RawUserConfiguration) Process(backend string, warnLogger *slog.Logger) (*UserConfiguration, error)

type SMBBackend

type SMBBackend struct {
	// contains filtered or unexported fields
}

func (*SMBBackend) Apply

func (b *SMBBackend) Apply(sharePWD string, vc *VMShareContext) (string, error)

type UserConfiguration

type UserConfiguration struct {
	// contains filtered or unexported fields
}

type VMShareContext

type VMShareContext struct {
	Instance    *vm.VM
	FileManager *vm.FileManager
	NetTapCtx   *NetTapRuntimeContext
}

type VMShareOptions

type VMShareOptions struct {
	Ports     []vm.PortForwardingRule
	EnableTap bool
}

Jump to

Keyboard shortcuts

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