server

package
v0.0.0-...-d5572aa Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 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 Authenticator

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

func NewAuthenticator

func NewAuthenticator(dataDir string, logger log.Logger, tokenManager jwt.TokenManager[User]) (*Authenticator, error)

func (Authenticator) AddUser

func (a Authenticator) AddUser(username, passphrase, masterKey string) (string, error)

func (Authenticator) Authenticate

func (a Authenticator) Authenticate(username, passphrase string) (string, error)

func (Authenticator) ValidateToken

func (a Authenticator) ValidateToken(token string) (User, error)

type Storage

type Storage struct{}

func NewStorage

func NewStorage() *Storage

func (Storage) Download

func (s Storage) Download(user User, filename string, dst io.Writer) error

func (Storage) List

func (s Storage) List(user User) ([]string, error)

func (Storage) Upload

func (s Storage) Upload(user User, filename string, src io.Reader) error

type User

type User struct {
	Username string
	DataDir  string
	// contains filtered or unexported fields
}

func (User) Key

func (u User) Key() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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