dfperms

package module
v0.0.0-...-f40b9db Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 2 Imported by: 0

README

Df-perms (Working title)

DF-Perms is a work in progress permissions manager for Dragonfly.

Roadmap

  • Group Display: Display group title and formatting for chat messages and player nametags
  • Command parser: Allow commands, subcommand and arguments to define their permission levels/tags and reflect them in the command preview.
  • Event Parser: Using peex to allow handlers to define what events should be executed based on permission level and tag.
  • Web Editor: A web editor for admins to update tags and levels for players and groups. Can be enabled/disabled through config.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(group *Group) error

Types

type Config

type Config struct {
	Group []ConfigGroup
}

Config contains all the groups to be registered from disk

func DefaultConfig

func DefaultConfig() Config

func (Config) New

func (c Config) New()

New applies the settings and groups provided by the config

type ConfigGroup

type ConfigGroup struct {
	Title string
	Level int16
	Tags  []string
}

A proxy struct to load a group

type Group

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

Group holds pre-defined tags and a permission level that can be applied to a session. Sessions may have multiple groups and group will take precidence if it has a higher level

func ByTitle

func ByTitle(title string) *Group

func NewGroup

func NewGroup(title string, level int16) *Group

func (Group) Level

func (g Group) Level() int16

func (Group) Title

func (g Group) Title() string

func (*Group) WithTags

func (g *Group) WithTags(tags []string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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