auditv1

package
v0.0.0-...-0f6a5af Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventFilter_FilterType_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "SERVICE",
		2: "METHOD",
		3: "TYPE",
	}
	EventFilter_FilterType_value = map[string]int32{
		"UNSPECIFIED": 0,
		"SERVICE":     1,
		"METHOD":      2,
		"TYPE":        3,
	}
)

Enum value maps for EventFilter_FilterType.

View Source
var File_config_service_audit_v1_audit_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {

	// Types that are assignable to StorageProvider:
	//
	//	*Config_DbProvider
	//	*Config_InMemory
	StorageProvider isConfig_StorageProvider `protobuf_oneof:"storage_provider"`
	// The rule to apply before between request ingress and the database.
	Filter *Filter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// The registered name of sinks to fan-out events to.
	Sinks []string `protobuf:"bytes,4,rep,name=sinks,proto3" json:"sinks,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDbProvider

func (x *Config) GetDbProvider() string

func (*Config) GetFilter

func (x *Config) GetFilter() *Filter

func (*Config) GetInMemory

func (x *Config) GetInMemory() bool

func (*Config) GetSinks

func (x *Config) GetSinks() []string

func (*Config) GetStorageProvider

func (m *Config) GetStorageProvider() isConfig_StorageProvider

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Config) ValidateAll

func (m *Config) ValidateAll() error

ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.

type ConfigMultiError

type ConfigMultiError []error

ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.

func (ConfigMultiError) AllErrors

func (m ConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigMultiError) Error

func (m ConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConfigValidationError

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

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type Config_DbProvider

type Config_DbProvider struct {
	// The name of the service where the auditor will persist events.
	DbProvider string `protobuf:"bytes,1,opt,name=db_provider,json=dbProvider,proto3,oneof"`
}

type Config_InMemory

type Config_InMemory struct {
	// A flag to store audit messages in-memory before flushing to sinks.
	// This is not recommended for production environments.
	InMemory bool `protobuf:"varint,2,opt,name=in_memory,json=inMemory,proto3,oneof"`
}

type EventFilter

type EventFilter struct {
	Field EventFilter_FilterType `protobuf:"varint,1,opt,name=field,proto3,enum=clutch.config.service.audit.v1.EventFilter_FilterType" json:"field,omitempty"`
	// Types that are assignable to Value:
	//
	//	*EventFilter_Text
	Value isEventFilter_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*EventFilter) Descriptor deprecated

func (*EventFilter) Descriptor() ([]byte, []int)

Deprecated: Use EventFilter.ProtoReflect.Descriptor instead.

func (*EventFilter) GetField

func (x *EventFilter) GetField() EventFilter_FilterType

func (*EventFilter) GetText

func (x *EventFilter) GetText() string

func (*EventFilter) GetValue

func (m *EventFilter) GetValue() isEventFilter_Value

func (*EventFilter) ProtoMessage

func (*EventFilter) ProtoMessage()

func (*EventFilter) ProtoReflect

func (x *EventFilter) ProtoReflect() protoreflect.Message

func (*EventFilter) Reset

func (x *EventFilter) Reset()

func (*EventFilter) String

func (x *EventFilter) String() string

func (*EventFilter) Validate

func (m *EventFilter) Validate() error

Validate checks the field values on EventFilter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*EventFilter) ValidateAll

func (m *EventFilter) ValidateAll() error

ValidateAll checks the field values on EventFilter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EventFilterMultiError, or nil if none found.

type EventFilterMultiError

type EventFilterMultiError []error

EventFilterMultiError is an error wrapping multiple validation errors returned by EventFilter.ValidateAll() if the designated constraints aren't met.

func (EventFilterMultiError) AllErrors

func (m EventFilterMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EventFilterMultiError) Error

func (m EventFilterMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type EventFilterValidationError

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

EventFilterValidationError is the validation error returned by EventFilter.Validate if the designated constraints aren't met.

func (EventFilterValidationError) Cause

Cause function returns cause value.

func (EventFilterValidationError) Error

Error satisfies the builtin error interface

func (EventFilterValidationError) ErrorName

func (e EventFilterValidationError) ErrorName() string

ErrorName returns error name.

func (EventFilterValidationError) Field

Field function returns field value.

func (EventFilterValidationError) Key

Key function returns key value.

func (EventFilterValidationError) Reason

Reason function returns reason value.

type EventFilter_FilterType

type EventFilter_FilterType int32

Switch to control what field the message

const (
	// Amounts to a no-op filter.
	EventFilter_UNSPECIFIED EventFilter_FilterType = 0
	// Compare to the service performing the operation.
	EventFilter_SERVICE EventFilter_FilterType = 1
	// Compare to the method being called.
	EventFilter_METHOD EventFilter_FilterType = 2
	// Compare against the action type of the event.
	EventFilter_TYPE EventFilter_FilterType = 3
)

func (EventFilter_FilterType) Descriptor

func (EventFilter_FilterType) Enum

func (EventFilter_FilterType) EnumDescriptor deprecated

func (EventFilter_FilterType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventFilter_FilterType.Descriptor instead.

func (EventFilter_FilterType) Number

func (EventFilter_FilterType) String

func (x EventFilter_FilterType) String() string

func (EventFilter_FilterType) Type

type EventFilter_Text

type EventFilter_Text struct {
	// Text to compare against the field to look for a match.
	Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

type Filter

type Filter struct {

	// Whether to treat the list as a allowlist (default) or a denylist.
	Denylist bool `protobuf:"varint,1,opt,name=denylist,proto3" json:"denylist,omitempty"`
	// The filter rules to apply against messages.
	Rules []*EventFilter `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*Filter) Descriptor deprecated

func (*Filter) Descriptor() ([]byte, []int)

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetDenylist

func (x *Filter) GetDenylist() bool

func (*Filter) GetRules

func (x *Filter) GetRules() []*EventFilter

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

func (x *Filter) ProtoReflect() protoreflect.Message

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

func (*Filter) Validate

func (m *Filter) Validate() error

Validate checks the field values on Filter with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Filter) ValidateAll

func (m *Filter) ValidateAll() error

ValidateAll checks the field values on Filter with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in FilterMultiError, or nil if none found.

type FilterMultiError

type FilterMultiError []error

FilterMultiError is an error wrapping multiple validation errors returned by Filter.ValidateAll() if the designated constraints aren't met.

func (FilterMultiError) AllErrors

func (m FilterMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (FilterMultiError) Error

func (m FilterMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type FilterValidationError

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

FilterValidationError is the validation error returned by Filter.Validate if the designated constraints aren't met.

func (FilterValidationError) Cause

func (e FilterValidationError) Cause() error

Cause function returns cause value.

func (FilterValidationError) Error

func (e FilterValidationError) Error() string

Error satisfies the builtin error interface

func (FilterValidationError) ErrorName

func (e FilterValidationError) ErrorName() string

ErrorName returns error name.

func (FilterValidationError) Field

func (e FilterValidationError) Field() string

Field function returns field value.

func (FilterValidationError) Key

func (e FilterValidationError) Key() bool

Key function returns key value.

func (FilterValidationError) Reason

func (e FilterValidationError) Reason() string

Reason function returns reason value.

type SinkConfig

type SinkConfig struct {

	// The rule(s) to filter events between audit source and sink emission.
	Filter *Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*SinkConfig) Descriptor deprecated

func (*SinkConfig) Descriptor() ([]byte, []int)

Deprecated: Use SinkConfig.ProtoReflect.Descriptor instead.

func (*SinkConfig) GetFilter

func (x *SinkConfig) GetFilter() *Filter

func (*SinkConfig) ProtoMessage

func (*SinkConfig) ProtoMessage()

func (*SinkConfig) ProtoReflect

func (x *SinkConfig) ProtoReflect() protoreflect.Message

func (*SinkConfig) Reset

func (x *SinkConfig) Reset()

func (*SinkConfig) String

func (x *SinkConfig) String() string

func (*SinkConfig) Validate

func (m *SinkConfig) Validate() error

Validate checks the field values on SinkConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SinkConfig) ValidateAll

func (m *SinkConfig) ValidateAll() error

ValidateAll checks the field values on SinkConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SinkConfigMultiError, or nil if none found.

type SinkConfigMultiError

type SinkConfigMultiError []error

SinkConfigMultiError is an error wrapping multiple validation errors returned by SinkConfig.ValidateAll() if the designated constraints aren't met.

func (SinkConfigMultiError) AllErrors

func (m SinkConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SinkConfigMultiError) Error

func (m SinkConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SinkConfigValidationError

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

SinkConfigValidationError is the validation error returned by SinkConfig.Validate if the designated constraints aren't met.

func (SinkConfigValidationError) Cause

func (e SinkConfigValidationError) Cause() error

Cause function returns cause value.

func (SinkConfigValidationError) Error

Error satisfies the builtin error interface

func (SinkConfigValidationError) ErrorName

func (e SinkConfigValidationError) ErrorName() string

ErrorName returns error name.

func (SinkConfigValidationError) Field

Field function returns field value.

func (SinkConfigValidationError) Key

Key function returns key value.

func (SinkConfigValidationError) Reason

func (e SinkConfigValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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