scanner

package
v0.0.0-...-e4b6a09 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mgr = New()

Mgr is the global manager for scanner

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Count returns the total count of scanner registrations according to the query.
	Count(ctx context.Context, query *q.Query) (int64, error)

	// List returns a list of currently configured scanner registrations.
	// Query parameters are optional
	List(ctx context.Context, query *q.Query) ([]*scanner.Registration, error)

	// Create creates a new scanner registration with the given data.
	// Returns the scanner registration identifier.
	Create(ctx context.Context, registration *scanner.Registration) (string, error)

	// Get returns the details of the specified scanner registration.
	Get(ctx context.Context, registrationUUID string) (*scanner.Registration, error)

	// Update updates the specified scanner registration.
	Update(ctx context.Context, registration *scanner.Registration) error

	// Delete deletes the specified scanner registration.
	Delete(ctx context.Context, registrationUUID string) error

	// SetAsDefault marks the specified scanner registration as default.
	// The implementation is supposed to unset any registration previously set as default.
	SetAsDefault(ctx context.Context, registrationUUID string) error

	// GetDefault returns the default scanner registration or `nil` if there are no registrations configured.
	GetDefault(ctx context.Context) (*scanner.Registration, error)

	// DefaultScannerUUID get default scanner UUID
	DefaultScannerUUID(ctx context.Context) (string, error)
}

Manager defines the related scanner API endpoints

func New

func New() Manager

New a basic manager

Jump to

Keyboard shortcuts

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