modules

package
v0.8.20 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultNicknameRegex = `^(?P<prefix>\[\S+][ ]*)?(?P<name>[^\[]+)(?P<suffix>[ ]*\[\S+])?`
View Source
const GroupSyncDefaultRoleColor = "#9B59B6"

Variables

View Source
var Modules = map[string]NewModuleFunc{}

Functions

This section is empty.

Types

type BaseModule

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

func NewBaseModule

func NewBaseModule(ctx context.Context, logger *zap.Logger, db *sql.DB, discord *discordgo.Session, guild *discordgo.Guild, job string, cfg *config.DiscordBot, enricher *mstlystcdata.Enricher) *BaseModule

type GroupSync

type GroupSync struct {
	*BaseModule
	// contains filtered or unexported fields
}

func (*GroupSync) Run

type GroupSyncUser

type GroupSyncUser struct {
	ExternalID string `alias:"external_id"`
	Group      string `alias:"group"`
	License    string `alias:"license"`
	SameJob    bool
}

type Module

type Module interface {
	Run(settings *users.DiscordSyncSettings) ([]*discordgo.MessageEmbed, error)
}

func GetModule

func GetModule(name string, base *BaseModule) (Module, error)

func NewGroupSync

func NewGroupSync(base *BaseModule) (Module, error)

func NewUserInfo

func NewUserInfo(base *BaseModule) (Module, error)

type NewModuleFunc

type NewModuleFunc func(*BaseModule) (Module, error)

type UserInfo

type UserInfo struct {
	*BaseModule
	// contains filtered or unexported fields
}

func (*UserInfo) Run

type UserRoleMapping added in v0.8.11

type UserRoleMapping struct {
	AccountID  uint64 `alias:"account_id"`
	ExternalID string `alias:"external_id"`
	JobGrade   int32  `alias:"job_grade"`
	Firstname  string `alias:"firstname"`
	Lastname   string `alias:"lastname"`
	Job        string `alias:"job"`
}

Jump to

Keyboard shortcuts

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