global

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalStore

type GlobalStore interface {
	Groups() map[string]global.Group
	Policies() map[string]global.Policy
	Programs() map[string]global.Program
	Reports() map[string]global.Report
}

GlobalStore defines the functionality the GlobalEntitiesMiddleware needs to be provided by a GlobalEntities store.

type MetadataStore

type MetadataStore interface {
	FindGlobalProgramMetadata(programID string, teamID string) (*api.GlobalProgramsMetadata, error)
	UpsertGlobalProgramMetadata(teamID, program string, defaultAutosend bool, defaultDisabled bool, defaultCron string, autosend *bool, disabled *bool, cron *string) error
	DeleteProgramMetadata(program string) error
}

MetadataStore defines the functionality needed by the GlobalEntitiesMiddleware to store a retrive metadata about global entities.

type Middleware

type Middleware func(api.VulcanitoService) api.VulcanitoService

Middleware defines the shape of the functions that return a vulcanito service middleware

func NewEntities

func NewEntities(l log.Logger, store GlobalStore, metadataStore MetadataStore,
	scanScheduler schedule.ScanScheduler, reportScheduler schedule.ReportScheduler,
	sconfig scanengine.Config, metricsClient metrics.Client, gpc global.GlobalPolicyConfig) Middleware

NewEntities returns a middleware to inject global entities functionality in the vulcanito service.

type ScanNotification

type ScanNotification struct {
	ProgramID string `json:"program_id"`
}

ScanNotification holds the required fields to unmarshal

Jump to

Keyboard shortcuts

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