api

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

dfss/dfssc/api/client.proto

It has these top-level messages:

Context
Promise
Signature
Hello

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterClientServer

func RegisterClientServer(s *grpc.Server, srv ClientServer)

Types

type ClientClient

type ClientClient interface {
	// / Handle reception of promises.
	TreatPromise(ctx context.Context, in *Promise, opts ...grpc.CallOption) (*api1.ErrorCode, error)
	// / Handle receptions of signatures.
	TreatSignature(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*api1.ErrorCode, error)
	// / Permits initial handshake for P2P between clients.
	Discover(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
}

func NewClientClient

func NewClientClient(cc *grpc.ClientConn) ClientClient

type ClientServer

type ClientServer interface {
	// / Handle reception of promises.
	TreatPromise(context.Context, *Promise) (*api1.ErrorCode, error)
	// / Handle receptions of signatures.
	TreatSignature(context.Context, *Signature) (*api1.ErrorCode, error)
	// / Permits initial handshake for P2P between clients.
	Discover(context.Context, *Hello) (*Hello, error)
}

type Context

type Context struct {
	// / SHA-512 certificate hash
	RecipientKeyHash []byte `protobuf:"bytes,1,opt,name=recipientKeyHash,proto3" json:"recipientKeyHash,omitempty"`
	// / SHA-512 certificate hash
	SenderKeyHash []byte `protobuf:"bytes,2,opt,name=senderKeyHash,proto3" json:"senderKeyHash,omitempty"`
	// / The signing sequence used
	Sequence []uint32 `protobuf:"varint,3,rep,name=sequence" json:"sequence,omitempty"`
	// / The list of signers hashes, as provided by the dfss file.
	// The order is very important.
	Signers [][]byte `protobuf:"bytes,4,rep,name=signers,proto3" json:"signers,omitempty"`
	// / The contract document hash, as provided by the dfss file
	ContractDocumentHash []byte `protobuf:"bytes,5,opt,name=contractDocumentHash,proto3" json:"contractDocumentHash,omitempty"`
	// / The unique signature attemp ID, as provided by the platform during the ready signal
	SignatureUUID string `protobuf:"bytes,6,opt,name=signatureUUID" json:"signatureUUID,omitempty"`
	// / The TTP address provided by the platform, to use in case of issue during signature.
	// / Empty if no TTP used.
	TtpAddrPort string `protobuf:"bytes,7,opt,name=ttpAddrPort" json:"ttpAddrPort,omitempty"`
	// / The TTP certificate SHA-512 hash
	TtpHash []byte `protobuf:"bytes,8,opt,name=ttpHash,proto3" json:"ttpHash,omitempty"`
	// / The signed metadata seal, as provided by the platform during the ready signal
	Seal []byte `protobuf:"bytes,10,opt,name=seal,proto3" json:"seal,omitempty"`
}

/ Context stores the current context of a specific promise or signature. It is a kind of "symbolic" promise, with no real cryptographic proofs inside.

func (*Context) Descriptor

func (*Context) Descriptor() ([]byte, []int)

func (*Context) ProtoMessage

func (*Context) ProtoMessage()

func (*Context) Reset

func (m *Context) Reset()

func (*Context) String

func (m *Context) String() string

type Hello

type Hello struct {
	// / Used version of DFSS client
	Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}

/ Hello message is used when discovering peers.

func (*Hello) Descriptor

func (*Hello) Descriptor() ([]byte, []int)

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) Reset

func (m *Hello) Reset()

func (*Hello) String

func (m *Hello) String() string

type Promise

type Promise struct {
	// / Metadata
	Context *Context `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
	// / The index of the sequence for this promise
	Index uint32 `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
	// / The crypographic payload, currently NOT IMPLEMENTED
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*Promise) Descriptor

func (*Promise) Descriptor() ([]byte, []int)

func (*Promise) GetContext

func (m *Promise) GetContext() *Context

func (*Promise) ProtoMessage

func (*Promise) ProtoMessage()

func (*Promise) Reset

func (m *Promise) Reset()

func (*Promise) String

func (m *Promise) String() string

type Signature

type Signature struct {
	// / Metadata
	Context *Context `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
	// / The crypographic payload, currently NOT IMPLEMENTED
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*Signature) Descriptor

func (*Signature) Descriptor() ([]byte, []int)

func (*Signature) GetContext

func (m *Signature) GetContext() *Context

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

Jump to

Keyboard shortcuts

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