slackv1

package
v0.0.0-...-e01fbee Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_service_auditsink_slack_v1_slack_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CustomMessage

type CustomMessage struct {

	// The full method in the format of /SERVICE/METHOD
	FullMethod string `protobuf:"bytes,1,opt,name=full_method,json=fullMethod,proto3" json:"full_method,omitempty"`
	// The slack sink uses the Go text/template package. Note: Use Clutch templating tokens for the following:
	// 1) For the Go Template Action syntax, use [[ ]] in lieu of {{ }}
	// 2) For the Go Template Variable syntax, use $$ in lieu of $
	//
	// Examples:
	// full_method: /clutch.k8s.v1.K8sAPI/ResizeHPA
	// message: "Min size: [[.Request.sizing.min]]\nMax size: [[.Request.sizing.max]]"
	//
	// full_method: /clutch.k8s.v1.K8sAPI/UpdateDeployment:
	// 1. Using `range`
	// message: "*Updated Labels*: [[range $$k, $$v := .Request.fields.labels]]\n- [[$$k]]: [[$$v]][[end]]"
	//
	// 2. Using Clutch helper `slackList`
	// message: "*Updated Labels*: [[slackList .Request.fields.labels]]"
	//
	// See https://api.slack.com/reference/surfaces/formatting for slack markdown formatting
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomMessage) Descriptor deprecated

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

Deprecated: Use CustomMessage.ProtoReflect.Descriptor instead.

func (*CustomMessage) GetFullMethod

func (x *CustomMessage) GetFullMethod() string

func (*CustomMessage) GetMessage

func (x *CustomMessage) GetMessage() string

func (*CustomMessage) ProtoMessage

func (*CustomMessage) ProtoMessage()

func (*CustomMessage) ProtoReflect

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

func (*CustomMessage) Reset

func (x *CustomMessage) Reset()

func (*CustomMessage) String

func (x *CustomMessage) String() string

func (*CustomMessage) Validate

func (m *CustomMessage) Validate() error

Validate checks the field values on CustomMessage 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 (*CustomMessage) ValidateAll

func (m *CustomMessage) ValidateAll() error

ValidateAll checks the field values on CustomMessage 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 CustomMessageMultiError, or nil if none found.

type CustomMessageMultiError

type CustomMessageMultiError []error

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

func (CustomMessageMultiError) AllErrors

func (m CustomMessageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CustomMessageMultiError) Error

func (m CustomMessageMultiError) Error() string

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

type CustomMessageValidationError

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

CustomMessageValidationError is the validation error returned by CustomMessage.Validate if the designated constraints aren't met.

func (CustomMessageValidationError) Cause

Cause function returns cause value.

func (CustomMessageValidationError) Error

Error satisfies the builtin error interface

func (CustomMessageValidationError) ErrorName

func (e CustomMessageValidationError) ErrorName() string

ErrorName returns error name.

func (CustomMessageValidationError) Field

Field function returns field value.

func (CustomMessageValidationError) Key

Key function returns key value.

func (CustomMessageValidationError) Reason

Reason function returns reason value.

type SlackConfig

type SlackConfig struct {
	Token     string           `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Channel   string           `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
	Filter    *v1.Filter       `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	Overrides []*CustomMessage `protobuf:"bytes,4,rep,name=overrides,proto3" json:"overrides,omitempty"`
	// contains filtered or unexported fields
}

https://clutch.sh/docs/advanced/security-auditing#slack-sink

func (*SlackConfig) Descriptor deprecated

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

Deprecated: Use SlackConfig.ProtoReflect.Descriptor instead.

func (*SlackConfig) GetChannel

func (x *SlackConfig) GetChannel() string

func (*SlackConfig) GetFilter

func (x *SlackConfig) GetFilter() *v1.Filter

func (*SlackConfig) GetOverrides

func (x *SlackConfig) GetOverrides() []*CustomMessage

func (*SlackConfig) GetToken

func (x *SlackConfig) GetToken() string

func (*SlackConfig) ProtoMessage

func (*SlackConfig) ProtoMessage()

func (*SlackConfig) ProtoReflect

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

func (*SlackConfig) Reset

func (x *SlackConfig) Reset()

func (*SlackConfig) String

func (x *SlackConfig) String() string

func (*SlackConfig) Validate

func (m *SlackConfig) Validate() error

Validate checks the field values on SlackConfig 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 (*SlackConfig) ValidateAll

func (m *SlackConfig) ValidateAll() error

ValidateAll checks the field values on SlackConfig 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 SlackConfigMultiError, or nil if none found.

type SlackConfigMultiError

type SlackConfigMultiError []error

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

func (SlackConfigMultiError) AllErrors

func (m SlackConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SlackConfigMultiError) Error

func (m SlackConfigMultiError) Error() string

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

type SlackConfigValidationError

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

SlackConfigValidationError is the validation error returned by SlackConfig.Validate if the designated constraints aren't met.

func (SlackConfigValidationError) Cause

Cause function returns cause value.

func (SlackConfigValidationError) Error

Error satisfies the builtin error interface

func (SlackConfigValidationError) ErrorName

func (e SlackConfigValidationError) ErrorName() string

ErrorName returns error name.

func (SlackConfigValidationError) Field

Field function returns field value.

func (SlackConfigValidationError) Key

Key function returns key value.

func (SlackConfigValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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