vlauth

package
Version: v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessType

type AccessType int

AccessType acl type

const (
	AccessRead  AccessType = 1
	AccessWrite AccessType = 2
)

nolint: golint

func (AccessType) Type

func (t AccessType) Type() string

Type return string representation of the type

type Error

type Error int

Error auth provider errors

const (
	ErrInvalidArgs Error = iota
	ErrUnknownProvider
	ErrAlreadyExists
	ErrNotFound
	ErrNotOpen
	ErrInternal
)

nolint: golint

func (Error) Error

func (e Error) Error() string

type IFace

type IFace interface {
	Permissions
	// Password try authenticate with username and password
	Password(clientID, user, password string) error
	// Shutdown provider
	Shutdown() error
}

IFace interface to auth backends

type Permissions

type Permissions interface {
	// ACL check access type for client id with username
	ACL(clientID, username, topic string, accessType AccessType, requestedQoS mqttp.QosType) (mqttp.QosType, error)
}

Permissions check session permissions

type Status

type Status int

Status auth

const (
	StatusAllow Status = iota
	StatusDeny
)

nolint: golint

func (Status) Desc added in v0.5.4

func (e Status) Desc() string

func (Status) Error

func (e Status) Error() string

Source Files

Jump to

Keyboard shortcuts

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