Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UserRoles = struct { // Base role required for any interaction with the bot. Base, KubernetesAdmin, KubernetesUser UserRole }{ "Base", "KubernetesAdmin", "KubernetesUser", }
UserRoles enumerates available UserRole.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
Authorizer ...
func New ¶
func New(cfg *config.SlackConfig, logger log.Logger) (*Authorizer, error)
New returns a new Authorizer or an error.
func (*Authorizer) IsUserAuthorized ¶
func (a *Authorizer) IsUserAuthorized(userID string, requiredUserRole UserRole) bool
IsUserAuthorized checks whether the given user is authorized to run the bot command.
func (*Authorizer) Run ¶
func (a *Authorizer) Run(stop <-chan struct{})
Run starts the continuous synchronization in the background.
Click to show internal directories.
Click to hide internal directories.