modules

package
v0.8.14 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Apache-2.0 Imports: 17 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

func (*BaseModule) GetSyncSettings added in v0.8.11

func (g *BaseModule) GetSyncSettings(ctx context.Context, job string) (*users.DiscordSyncSettings, error)

type GroupSync

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

func (*GroupSync) Run

func (g *GroupSync) Run() error

type GroupSyncUser

type GroupSyncUser struct {
	ExternalID string `alias:"external_id"`
	Group      string `alias:"group"`
}

type Module

type Module interface {
	Run() 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

func (g *UserInfo) Run() error

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