router

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, values *Values, services *Services) error

Execute will route the incoming finding to the appropriate remediations.

Types

type Configuration

type Configuration struct {
	APIVersion string
	Spec       struct {
		Name       string
		Parameters struct {
			ETD struct {
				BadIP        []badip.Automation        `yaml:"bad_ip"`
				AnomalousIAM []anomalousiam.Automation `yaml:"anomalous_iam"`
			}
		}
	}
}

Configuration maps findings to automations.

func Config

func Config() (*Configuration, error)

Config will return the router's configuration.

type Namer

type Namer interface {
	Name([]byte) string
}

Name represents findings that export their name.

type Services

type Services struct {
	PubSub        *services.PubSub
	Configuration *Configuration
	Logger        *services.Logger
	Resource      *services.Resource
}

Services contains the services needed for this function.

type Values

type Values struct {
	Finding []byte
}

Values contains the required values for this function.

Jump to

Keyboard shortcuts

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