audit

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditConfig

type AuditConfig struct {
	Enabled                   bool
	AuditAuthorizationSuccess bool
	ConfigurationType         AuditingConfigType
	AuditFilter               string
}

AuditConfig represents the Atlas Project audit log config

type AuditLog

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

AuditLog is the default implementation of the AuditLogService using the Atlas SDK

func NewAuditLog

func NewAuditLog(api admin.AuditingApi) *AuditLog

NewAuditLog wraps the SDK AuditingApi as an AuditLog

func NewAuditLogService

func NewAuditLogService(ctx context.Context, provider atlas.Provider, secretRef *types.NamespacedName, log *zap.SugaredLogger) (*AuditLog, error)

NewAuditLogService creates an AuditLog from credentials and the atlas provider

func (*AuditLog) Get

func (s *AuditLog) Get(ctx context.Context, projectID string) (*AuditConfig, error)

Get an Atlas Project audit log configuration

func (*AuditLog) Set

func (s *AuditLog) Set(ctx context.Context, projectID string, auditing *AuditConfig) error

Set an Atlas Project audit log configuration

type AuditLogService

type AuditLogService interface {
	Get(ctx context.Context, projectID string) (*AuditConfig, error)
	Set(ctx context.Context, projectID string, auditing *AuditConfig) error
}

AuditLogService is the interface exposed by this translation layer over the Atlas AuditLog

type AuditingConfigType

type AuditingConfigType string
const (
	None          AuditingConfigType = "NONE"
	FilterBuilder AuditingConfigType = "FILTER_BUILDER"
	FilterJSON    AuditingConfigType = "FILTER_JSON"
)

Jump to

Keyboard shortcuts

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