mask

package
v0.0.0-...-df918ef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: ISC Imports: 5 Imported by: 0

Documentation

Overview

Package mask provides a permissions.Handler implementation that works with traditional nick!user@host masks

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMatch = errors.New("no mask matches")

ErrNoMatch is returned when there is no matching entry to a given EphemeralUser

Functions

This section is empty.

Types

type Handler

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

Handler is an IRC mask based permission handler

func (*Handler) IsAuthorised

func (h *Handler) IsAuthorised(userToCheck *user.EphemeralUser, requiredPermissions []string) (bool, error)

IsAuthorised implements permissions.Handler

type Mask

type Mask struct {
	Mask  string
	Perms []string
}

Mask represents a nick!user@host mask with a set of available permissions

Jump to

Keyboard shortcuts

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