pkg

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserBackend

type UserBackend interface {
	Authenticate(ctx context.Context, username, password string) error
	DumpCache(ctx context.Context) (map[string]int64, error)
	SetExpiration(ctx context.Context, key string, expiration int64)
	DeleteCacheEntry(ctx context.Context, key string)
}

type UserBackendError

type UserBackendError struct {
	Code    UserBackendErrorCode
	Message string
}

func NewUserBackendError

func NewUserBackendError(code UserBackendErrorCode) UserBackendError

func (UserBackendError) Error

func (sr UserBackendError) Error() string

func (UserBackendError) WithMessage

func (sr UserBackendError) WithMessage(msg string) UserBackendError

type UserBackendErrorCode

type UserBackendErrorCode string
const (
	UserBackendErrorNotFound           UserBackendErrorCode = "USERBACKEND_ERROR_NOT_FOUND"
	UserBackendErrorInvalidCredentials                      = "USERBACKED_ERROR_INVALID_CREDENTIALS"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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