service

package
v0.0.0-...-4c1e54e Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "CentralizedCalypsoService"

ServiceName is used for registration on the onet.

Variables

This section is empty.

Functions

This section is empty.

Types

type CentralizedCalypsoDB

type CentralizedCalypsoDB struct {
	*bolt.DB
	// contains filtered or unexported fields
}

func NewCentralizedCalypsoDB

func NewCentralizedCalypsoDB(db *bolt.DB, bn []byte) *CentralizedCalypsoDB

func (*CentralizedCalypsoDB) GetWrite

func (cdb *CentralizedCalypsoDB) GetWrite(wID string) (*WriteRequest, error)

func (*CentralizedCalypsoDB) StoreWrite

func (cdb *CentralizedCalypsoDB) StoreWrite(req *WriteRequest) (string, error)

type Client

type Client struct {
	*onet.Client
}

Client is a structure to communicate with the template service

func NewClient

func NewClient() *Client

NewClient instantiates a new template.Client

func (*Client) Read

func (c *Client) Read(r *onet.Roster, rr *ReadRequest) (*ReadReply, error)

func (*Client) Write

func (c *Client) Write(r *onet.Roster, wr *WriteRequest) (*WriteReply, error)

type ReadReply

type ReadReply struct {
	K kyber.Point
	C kyber.Point
}

type ReadRequest

type ReadRequest struct {
	WriteID string
	Sig     []byte
}

type Service

type Service struct {
	// We need to embed the ServiceProcessor, so that incoming messages
	// are correctly handled.
	*onet.ServiceProcessor
	// contains filtered or unexported fields
}

Service is our template-service

func (*Service) Read

func (s *Service) Read(req *ReadRequest) (*ReadReply, error)

func (*Service) Write

func (s *Service) Write(req *WriteRequest) (*WriteReply, error)

type WriteReply

type WriteReply struct {
	WriteID string
}

type WriteRequest

type WriteRequest struct {
	EncData   []byte
	DataHash  []byte
	K         kyber.Point
	C         kyber.Point
	Reader    kyber.Point
	EncReader []byte
}

Jump to

Keyboard shortcuts

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