Documentation ¶
Index ¶
- Variables
- type CustomMessage
- func (*CustomMessage) Descriptor() ([]byte, []int)deprecated
- func (x *CustomMessage) GetFullMethod() string
- func (x *CustomMessage) GetMessage() string
- func (*CustomMessage) ProtoMessage()
- func (x *CustomMessage) ProtoReflect() protoreflect.Message
- func (x *CustomMessage) Reset()
- func (x *CustomMessage) String() string
- func (m *CustomMessage) Validate() error
- func (m *CustomMessage) ValidateAll() error
- type CustomMessageMultiError
- type CustomMessageValidationError
- func (e CustomMessageValidationError) Cause() error
- func (e CustomMessageValidationError) Error() string
- func (e CustomMessageValidationError) ErrorName() string
- func (e CustomMessageValidationError) Field() string
- func (e CustomMessageValidationError) Key() bool
- func (e CustomMessageValidationError) Reason() string
- type SlackConfig
- func (*SlackConfig) Descriptor() ([]byte, []int)deprecated
- func (x *SlackConfig) GetChannel() string
- func (x *SlackConfig) GetFilter() *v1.Filter
- func (x *SlackConfig) GetOverrides() []*CustomMessage
- func (x *SlackConfig) GetToken() string
- func (*SlackConfig) ProtoMessage()
- func (x *SlackConfig) ProtoReflect() protoreflect.Message
- func (x *SlackConfig) Reset()
- func (x *SlackConfig) String() string
- func (m *SlackConfig) Validate() error
- func (m *SlackConfig) ValidateAll() error
- type SlackConfigMultiError
- type SlackConfigValidationError
- func (e SlackConfigValidationError) Cause() error
- func (e SlackConfigValidationError) Error() string
- func (e SlackConfigValidationError) ErrorName() string
- func (e SlackConfigValidationError) Field() string
- func (e SlackConfigValidationError) Key() bool
- func (e SlackConfigValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (e CustomMessageValidationError) Cause() error
Cause function returns cause value.
func (CustomMessageValidationError) Error ¶
func (e CustomMessageValidationError) Error() string
Error satisfies the builtin error interface
func (CustomMessageValidationError) ErrorName ¶
func (e CustomMessageValidationError) ErrorName() string
ErrorName returns error name.
func (CustomMessageValidationError) Field ¶
func (e CustomMessageValidationError) Field() string
Field function returns field value.
func (CustomMessageValidationError) Key ¶
func (e CustomMessageValidationError) Key() bool
Key function returns key value.
func (CustomMessageValidationError) Reason ¶
func (e CustomMessageValidationError) Reason() string
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 ¶
func (e SlackConfigValidationError) Cause() error
Cause function returns cause value.
func (SlackConfigValidationError) Error ¶
func (e SlackConfigValidationError) Error() string
Error satisfies the builtin error interface
func (SlackConfigValidationError) ErrorName ¶
func (e SlackConfigValidationError) ErrorName() string
ErrorName returns error name.
func (SlackConfigValidationError) Field ¶
func (e SlackConfigValidationError) Field() string
Field function returns field value.
func (SlackConfigValidationError) Key ¶
func (e SlackConfigValidationError) Key() bool
Key function returns key value.
func (SlackConfigValidationError) Reason ¶
func (e SlackConfigValidationError) Reason() string
Reason function returns reason value.