usecasedns

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdResolver

type CmdResolver interface {
	CmdResolvConfAndPrintf() (*string, *string, error)
	CmdSystemdResolv() (*string, *string, error)
	CmdDownResolvConf() (*string, error)
}

type CmdToolsManager

type CmdToolsManager interface {
	SplitCmd() ([]string, error)
	PassArgumentsToExec(cmdArg []string) *exec.Cmd
}

type DnsSetters

type DnsSetters interface {
	SetAddress(matches []string)
}

type DnsUseCase

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

func NewDnsUseCase

func NewDnsUseCase(
	cmdSetters СmdSetters, cmdToolsManager CmdToolsManager,
	cmdResolver CmdResolver, processManager ProcessManager, dnsSetters DnsSetters,
) (obj *DnsUseCase, err error)

func (*DnsUseCase) CaseAddDnsAddress

func (dns *DnsUseCase) CaseAddDnsAddress(text string)

func (*DnsUseCase) CaseSetupDnsNotUseSystemd

func (dns *DnsUseCase) CaseSetupDnsNotUseSystemd() error

func (*DnsUseCase) CaseSetupDnsWithUseSystemd

func (dns *DnsUseCase) CaseSetupDnsWithUseSystemd() error

func (*DnsUseCase) GetCmdReturnResolver

func (dns *DnsUseCase) GetCmdReturnResolver() (*string, error)

func (*DnsUseCase) RunProcessCmd

func (dns *DnsUseCase) RunProcessCmd(cmdArg []string) error

func (*DnsUseCase) SplitCommand

func (dns *DnsUseCase) SplitCommand(cmd string) ([]string, error)

type ProcessManager

type ProcessManager interface {
	RunCmdWithPipe(args1, args2 []string) error
	SetToProc(cmdExec *exec.Cmd)
	StartProc() error
}

type СmdSetters

type СmdSetters interface {
	SetCommand(cmd string)
}

Jump to

Keyboard shortcuts

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