template

package module
v0.0.0-...-20cb4a4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

README

Build Status

Navigation: DEDIS :: Cothority Template

Blockchain Based Approach for Preserving Car Maintenance History

Fighting frauds in the automotive industry is an ongoing challenge. Concerned by this problem are not only the owners and potential buyers of second-hand vehicles, but also entities like insurance companies, garages, car dealers, police etc. We present a solution for establishing trust between these parties, by keeping records of repairs and maintenance vehicle inspections in a ByzCoin Blockchain. Our implementation builds on top the Cothority Template (Template)

Documentation

Index

Constants

View Source
const (
	// ErrorParse indicates an error while parsing the protobuf-file.
	ErrorParse = iota + 4000
)
View Source
const ServiceName = "Template"

ServiceName is used for registration on the onet.

Variables

This section is empty.

Functions

This section is empty.

Types

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) Clock

func (c *Client) Clock(r *onet.Roster) (*ClockReply, error)

Clock chooses one server from the Roster at random. It sends a Clock to it, which is then processed on the server side via the code in the service package.

Clock will return the time in seconds it took to run the protocol.

func (*Client) Count

func (c *Client) Count(si *network.ServerIdentity) (int, error)

Count will return the number of times `Clock` has been called on this service-node.

type Clock

type Clock struct {
	Roster *onet.Roster
}

Clock will run the tepmlate-protocol on the roster and return the time spent doing so.

type ClockReply

type ClockReply struct {
	Time     float64
	Children int
}

ClockReply returns the time spent for the protocol-run.

type Count

type Count struct {
}

Count will return how many times the protocol has been run.

type CountReply

type CountReply struct {
	Count int
}

CountReply returns the number of protocol-runs

Directories

Path Synopsis
* This is a template for creating an app.
* This is a template for creating an app.
Conode is the main binary for running a Cothority server.
Conode is the main binary for running a Cothority server.
Package protocol contains an example demonstrating how to write a protocol and a simulation.
Package protocol contains an example demonstrating how to write a protocol and a simulation.

Jump to

Keyboard shortcuts

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