files

package
v0.0.0-...-5968118 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Checker holds paths to static files, list of file users and general (no user or pattern) acl records.

func NewChecker

func NewChecker(backends, passwordPath, aclPath string, logLevel log.Level, hasher hashing.HashComparer) (*Checker, error)

NewCheckers initializes a static files checker.

func (*Checker) CheckAcl

func (o *Checker) CheckAcl(username, topic, clientid string, acc int32) (bool, error)

CheckAcl checks that the topic may be read/written by the given user/clientid.

func (*Checker) GetSuperuser

func (o *Checker) GetSuperuser(username string) (bool, error)

GetSuperuser returns false as there are no files superusers.

func (*Checker) GetUser

func (o *Checker) GetUser(username, password, clientid string) (bool, error)

GetUser checks that user exists and password is correct.

func (*Checker) Halt

func (o *Checker) Halt()

Halt does nothing for static files as there's no cleanup needed.

func (*Checker) Users

func (o *Checker) Users() map[string]*staticFileUser

Jump to

Keyboard shortcuts

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