bridger

package
v0.0.0-...-ee9e9f6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2016 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridger

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

The bridger manage the ws connection between the clients and the storages and manage the incoming http request used to share files between the devices.

func NewBridger

func NewBridger(db *db.DB, router *mux.Router, jwtMiddle *jwtmiddleware.JWTMiddleware) *Bridger

Create a new bridger

func (*Bridger) NewFromClientHandler

func (b *Bridger) NewFromClientHandler(toStorage *toStorageHandler) *fromClientHandler

func (*Bridger) NewFromStorageHandler

func (b *Bridger) NewFromStorageHandler() *fromStorageHandler

Constructor for the bridger.

func (*Bridger) NewToStorageHandler

func (b *Bridger) NewToStorageHandler() *toStorageHandler

func (*Bridger) NewtoClientHandler

func (b *Bridger) NewtoClientHandler(fromStorage *fromStorageHandler) *toClientHandler

Contructor for the handler for the request made by the storages to upload the file to the client

type Client

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

type DirectConnectionHandler

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

func NewDirectConnectionHandler

func NewDirectConnectionHandler(bridger *Bridger) *DirectConnectionHandler

Create a new direct handler. This handler request tio a storage his public certificate an dip

func (*DirectConnectionHandler) ServeHTTP

func (h *DirectConnectionHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type PublicInfoHandler

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

func NewPublicInfoHandler

func NewPublicInfoHandler(bridger *Bridger) *PublicInfoHandler

func (*PublicInfoHandler) ServeHTTP

func (h *PublicInfoHandler) ServeHTTP(response http.ResponseWriter, request *http.Request)

type Storage

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

This struct contains the channel used to cominicate with the storage and to receive the responses

Jump to

Keyboard shortcuts

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