discovery

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFileAlreadyExists = "a file already exists with the requested path"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetLocalDestValuesParam

type GetLocalDestValuesParam struct {
	Container domain.ContainerDocker
	Backup    domain.RunBackupDetails
	Dest      domain.ConfigDestLocal
}

type LocalDetailsParam

type LocalDetailsParam struct {
	Counter       int
	Container     domain.ContainerDocker
	BackupDetails domain.RunBackupDetails
	DestLocal     domain.ConfigDestLocal
}

type ReconClient

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

func NewReconClient

func NewReconClient(config domain.Config) *ReconClient

The recon client goes and check to see what we need before any actions are taken. Once the recon has done its job all the other services will be able run without needing to validate along the way.

func (ReconClient) DockerScout

func (c ReconClient) DockerScout(container domain.ContainerDocker) (*domain.RunDetails, error)

Scout is the main logic loop and reports back its findings to

func (ReconClient) GetLocalDestDetails

func (c ReconClient) GetLocalDestDetails(params LocalDetailsParam) (domain.RunDetailsDestLocal, error)

func (c ReconClient) GetLocalDestDetails(config domain.ConfigDestLocal, backup domain.RunBackupDetails) domain.RunDetailsDestLocal {

func (ReconClient) GetValidFileName

func (c ReconClient) GetValidFileName(config domain.ConfigContainerTar, directory string) string

This will update the filename if one already exists with a number appended

func (ReconClient) NewBackupDetails

func (c ReconClient) NewBackupDetails(targetDir, folderName, destDir string) (domain.RunBackupDetails, error)

This will generate new backup details and store them.

func (ReconClient) TestBackupName

func (c ReconClient) TestBackupName(dir, name, ext string) error

Test to make sure the path works before we commit the values to the RunDetails.

func (ReconClient) ValidateBackupDetails

func (c ReconClient) ValidateBackupDetails(details domain.RunBackupDetails) error

func (ReconClient) ValidateLocalDestDetails

func (c ReconClient) ValidateLocalDestDetails(details domain.RunDetailsDestLocal) error

Jump to

Keyboard shortcuts

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