transport

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: 9 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 interface {
	AddUser(username, passphrase, masterKey string) (token string, err error)
	Authenticate(username, passphrase string) (token string, err error)
	ValidateToken(token string) (server.User, error)
}

type AuthenticatorService

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

func NewAuthenticatorService

func NewAuthenticatorService(authenticator Authenticator, logger log.Logger) *AuthenticatorService

func (AuthenticatorService) AddUser

func (AuthenticatorService) Authenticate

type Storage

type Storage interface {
	Upload(user server.User, filename string, src io.Reader) error
	Download(user server.User, filename string, dst io.Writer) error
	List(user server.User) ([]string, error)
}

type StorageService

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

func NewStorageService

func NewStorageService(authenticator Authenticator, storage Storage, logger log.Logger) *StorageService

func (StorageService) Download

func (s StorageService) Download(request *proto.FileRequest, stream proto.Storage_DownloadServer) error

func (StorageService) List

func (StorageService) Upload

func (s StorageService) Upload(request *proto.FileRequest, stream proto.Storage_UploadServer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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