scanner

package
v0.0.0-...-44f477e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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)
}

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