audit

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditReporter

type AuditReporter interface {
	ReportExecutorAuditEvent(ctx context.Context, e ExecutorAuditEvent) error
	ReportSourceAuditEvent(ctx context.Context, e SourceAuditEvent) error
}

AuditReporter defines interface for reporting audit events

func GetReporter

func GetReporter(remoteCfgSyncEnabled bool, logger logrus.FieldLogger, gql GraphQLClient) AuditReporter

GetReporter creates new AuditReporter

type ExecutorAuditEvent

type ExecutorAuditEvent struct {
	CreatedAt               string
	PluginName              string
	PlatformUser            string
	BotPlatform             *graphql.BotPlatform
	Command                 string
	Channel                 string
	AdditionalCreateContext map[string]interface{}
}

ExecutorAuditEvent contains audit event data

type GraphQLAuditReporter

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

GraphQLAuditReporter is the graphql audit reporter

func (*GraphQLAuditReporter) ReportExecutorAuditEvent

func (r *GraphQLAuditReporter) ReportExecutorAuditEvent(ctx context.Context, e ExecutorAuditEvent) error

ReportExecutorAuditEvent reports executor audit event using graphql interface

func (*GraphQLAuditReporter) ReportSourceAuditEvent

func (r *GraphQLAuditReporter) ReportSourceAuditEvent(ctx context.Context, e SourceAuditEvent) error

ReportSourceAuditEvent reports source audit event using graphql interface

type GraphQLClient

type GraphQLClient interface {
	Client() *graphql.Client
	DeploymentID() string
}

GraphQLClient defines GraphQL client.

type NoopAuditReporter

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

NoopAuditReporter is the NOOP audit reporter

func (*NoopAuditReporter) ReportExecutorAuditEvent

func (r *NoopAuditReporter) ReportExecutorAuditEvent(ctx context.Context, e ExecutorAuditEvent) error

ReportExecutorAuditEvent is a NOOP

func (*NoopAuditReporter) ReportSourceAuditEvent

func (r *NoopAuditReporter) ReportSourceAuditEvent(ctx context.Context, e SourceAuditEvent) error

ReportSourceAuditEvent is a NOOP

type SourceAuditEvent

type SourceAuditEvent struct {
	CreatedAt  string
	PluginName string
	Event      string
	Source     SourceDetails
}

SourceAuditEvent contains audit event data

type SourceDetails

type SourceDetails struct {
	Name        string
	DisplayName string
}

Jump to

Keyboard shortcuts

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