Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetBotToken() string
- func (x *Config) GetSigningSecret() string
- func (x *Config) GetVerificationToken() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
Constants ¶
This section is empty.
Variables ¶
var File_config_module_bot_slackbot_v1_slackbot_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Bot tokens begin with "xoxb-", https://api.slack.com/authentication/token-types#bot BotToken string `protobuf:"bytes,1,opt,name=bot_token,json=botToken,proto3" json:"bot_token,omitempty"` // Slack signs the requests using this secret and is a way to confirm that each request came from Slack. // https://api.slack.com/authentication/verifying-requests-from-slack SigningSecret string `protobuf:"bytes,2,opt,name=signing_secret,json=signingSecret,proto3" json:"signing_secret,omitempty"` // Bot app's verification token is sent in each request from Slack and is a way to confirm the request came from // Slack. VerificationToken string `protobuf:"bytes,3,opt,name=verification_token,json=verificationToken,proto3" json:"verification_token,omitempty"` // contains filtered or unexported fields }
TODO: (sperry) revist this when module is created. we may want to add more / support configuration for multiple bots.
func (*Config) Descriptor
deprecated
func (*Config) GetBotToken ¶
func (*Config) GetSigningSecret ¶
func (*Config) GetVerificationToken ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
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 ¶
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.