linkvalidator

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// ValidateLink checks if the link URL is available in a separate goroutine
	// returns true if the task was added for processing, false if it was skipped
	ValidateLink(linkDestination, contentSourcePath string) bool
}

Interface validates the links URLs

func New

func New(workerCount int, failFast bool, wg *sync.WaitGroup, registry registry.Interface, hostsToReport []string) (Interface, taskqueue.QueueController, error)

New creates new Validator

type ValidatorWorker

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

ValidatorWorker holds nessesary objects ti validate URl

func NewValidatorWorker

func NewValidatorWorker(repository registry.Interface, hostsToReport []string) (*ValidatorWorker, error)

NewValidatorWorker creates new ValidatorWorker

func (*ValidatorWorker) Validate

func (v *ValidatorWorker) Validate(ctx context.Context, LinkDestination string, ContentSourcePath string) error

Validate validates a link

Directories

Path Synopsis
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors
SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Gardener contributors

Jump to

Keyboard shortcuts

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