moroz

package
v0.0.0-...-1c1f511 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHTTPRoutes

func AddHTTPRoutes(r *mux.Router, e Endpoints, logger log.Logger)

Types

type ConfigStore

type ConfigStore interface {
	AllConfigs(ctx context.Context) ([]santa.Config, error)
	Config(ctx context.Context, machineID string) (santa.Config, error)
}

type Endpoints

type Endpoints struct {
	PreflightEndpoint    endpoint.Endpoint
	RuleDownloadEndpoint endpoint.Endpoint
	EventUploadEndpoint  endpoint.Endpoint
}

func MakeServerEndpoints

func MakeServerEndpoints(svc Service) Endpoints

type Middleware

type Middleware func(Service) Service

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

type SantaService

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

func NewService

func NewService(ds ConfigStore, eventDir string, flPersistEvents bool) (*SantaService, error)

func (*SantaService) Preflight

func (svc *SantaService) Preflight(ctx context.Context, machineID string, p santa.PreflightPayload) (*santa.Preflight, error)

func (*SantaService) RuleDownload

func (svc *SantaService) RuleDownload(ctx context.Context, machineID string) ([]santa.Rule, error)

func (*SantaService) UploadEvent

func (svc *SantaService) UploadEvent(ctx context.Context, machineID string, events []santa.EventPayload) error

type Service

type Service interface {
	Preflight(ctx context.Context, machineID string, p santa.PreflightPayload) (*santa.Preflight, error)
	RuleDownload(ctx context.Context, machineID string) ([]santa.Rule, error)
	UploadEvent(ctx context.Context, machineID string, events []santa.EventPayload) error
}

Jump to

Keyboard shortcuts

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