usecase

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandExecutor

type CommandExecutor interface {
	GetDefaultNetworkInterface(ctx context.Context) (entity.NetworkInterface, error)
	GetNetworkServiceByNetworkInterface(
		ctx context.Context,
		networkInterface entity.NetworkInterface,
	) (entity.NetworkService, error)
	GetNetworkInfoByNetworkService(
		ctx context.Context,
		networkService entity.NetworkService,
	) (*entity.NetworkInfo, error)
	SetNetworkAdditionalRoutes(
		ctx context.Context,
		network *entity.Network,
		networkHostSetupList []*entity.NetworkHostSetup,
	) error
	ListVPN(ctx context.Context) ([]entity.VPNService, error)
	GetCurrentVPN(ctx context.Context) (entity.VPNService, error)
	OpenInFinder(ctx context.Context, path string) error
}

type CommandRunner added in v0.1.25

type CommandRunner interface {
	Run(ctx context.Context, name string, args ...string) ([]string, error)
}

type Host

type Host interface {
	Add(ctx context.Context, host *entity.Host) (*entity.Host, error)
	List(ctx context.Context, filter *entity.ListHostFilter) ([]*entity.Host, error)
	Delete(ctx context.Context, id uint64) error
}

type Network

type Network interface {
	Add(ctx context.Context, network *entity.Network) (*entity.Network, error)
	List(ctx context.Context, filter *entity.ListNetworkFilter) ([]*entity.NetworkWithStatus, error)
	Delete(ctx context.Context, id uint64) error

	ListVPNServices(ctx context.Context) ([]entity.VPNService, error)
}

type NetworkHost

type NetworkHost interface {
	Add(ctx context.Context, networkHost *entity.NetworkHost) (*entity.NetworkHost, error)
	List(ctx context.Context, filter *entity.ListNetworkHostFilter) ([]*entity.NetworkHost, error)
	Delete(ctx context.Context, id uint64) error
	ExportByNetworkIDForContext(
		ctx context.Context,
		networkID uint64,
	) (*entity.NetworkHostContextExportPayload, error)
	ImportByNetworkIDFromJSON(ctx context.Context, networkID uint64, jsonData string) error
}

type NetworkHostSetup

type NetworkHostSetup interface {
	SyncByNetworkID(ctx context.Context, network uint64) error
	ResetByNetworkID(ctx context.Context, networkID uint64) error
}

type Update

type Update interface {
	CheckForUpdates() (*entity.UpdateInfo, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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