client.pb.go 9.38 KB
Newer Older
Caro Axel's avatar
Caro Axel committed
1 2 3 4 5 6 7 8 9 10 11
// Code generated by protoc-gen-go.
// source: dfss/dfssc/api/client.proto
// DO NOT EDIT!

/*
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:
12
	Context
Caro Axel's avatar
Caro Axel committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
	Promise
	Signature
	Hello
*/
package api

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import api1 "dfss/dfssp/api"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion1

38
type Context struct {
Caro Axel's avatar
Caro Axel committed
39 40 41 42 43 44 45
	RecipientKeyHash     []byte   `protobuf:"bytes,1,opt,name=recipientKeyHash,proto3" json:"recipientKeyHash,omitempty"`
	SenderKeyHash        []byte   `protobuf:"bytes,2,opt,name=senderKeyHash,proto3" json:"senderKeyHash,omitempty"`
	Sequence             []uint32 `protobuf:"varint,3,rep,name=sequence" json:"sequence,omitempty"`
	Signers              [][]byte `protobuf:"bytes,4,rep,name=signers,proto3" json:"signers,omitempty"`
	ContractDocumentHash []byte   `protobuf:"bytes,5,opt,name=contractDocumentHash,proto3" json:"contractDocumentHash,omitempty"`
	SignatureUUID        string   `protobuf:"bytes,6,opt,name=signatureUUID" json:"signatureUUID,omitempty"`
	SignedHash           []byte   `protobuf:"bytes,7,opt,name=signedHash,proto3" json:"signedHash,omitempty"`
46 47 48 49 50 51 52
}

func (m *Context) Reset()                    { *m = Context{} }
func (m *Context) String() string            { return proto.CompactTextString(m) }
func (*Context) ProtoMessage()               {}
func (*Context) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

Caro Axel's avatar
Caro Axel committed
53
// Promise message contains all the required information to verify
54
// the identity of the sender and receiver, and the actual promise
Caro Axel's avatar
Caro Axel committed
55
type Promise struct {
56 57 58
	Context *Context `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
	Index   uint32   `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
	Payload []byte   `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
Caro Axel's avatar
Caro Axel committed
59 60 61 62 63
}

func (m *Promise) Reset()                    { *m = Promise{} }
func (m *Promise) String() string            { return proto.CompactTextString(m) }
func (*Promise) ProtoMessage()               {}
64 65 66 67 68 69 70 71
func (*Promise) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *Promise) GetContext() *Context {
	if m != nil {
		return m.Context
	}
	return nil
}
Caro Axel's avatar
Caro Axel committed
72 73

// Signature message contains all the required information to verify
74
// the identity of the sender and receiver, and the actual signature
Caro Axel's avatar
Caro Axel committed
75
type Signature struct {
76 77
	Context *Context `protobuf:"bytes,1,opt,name=context" json:"context,omitempty"`
	Payload []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
Caro Axel's avatar
Caro Axel committed
78 79 80 81 82
}

func (m *Signature) Reset()                    { *m = Signature{} }
func (m *Signature) String() string            { return proto.CompactTextString(m) }
func (*Signature) ProtoMessage()               {}
83 84 85 86 87 88 89 90
func (*Signature) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *Signature) GetContext() *Context {
	if m != nil {
		return m.Context
	}
	return nil
}
Caro Axel's avatar
Caro Axel committed
91

92 93
// Hello message is used when discovering peers.
// It contains the current version of the software.
Caro Axel's avatar
Caro Axel committed
94 95 96 97 98 99 100
type Hello struct {
	Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}

func (m *Hello) Reset()                    { *m = Hello{} }
func (m *Hello) String() string            { return proto.CompactTextString(m) }
func (*Hello) ProtoMessage()               {}
101
func (*Hello) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
Caro Axel's avatar
Caro Axel committed
102 103

func init() {
104
	proto.RegisterType((*Context)(nil), "api.Context")
Caro Axel's avatar
Caro Axel committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
	proto.RegisterType((*Promise)(nil), "api.Promise")
	proto.RegisterType((*Signature)(nil), "api.Signature")
	proto.RegisterType((*Hello)(nil), "api.Hello")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// Client API for Client service

type ClientClient interface {
	TreatPromise(ctx context.Context, in *Promise, opts ...grpc.CallOption) (*api1.ErrorCode, error)
	TreatSignature(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*api1.ErrorCode, error)
	Discover(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error)
}

type clientClient struct {
	cc *grpc.ClientConn
}

func NewClientClient(cc *grpc.ClientConn) ClientClient {
	return &clientClient{cc}
}

func (c *clientClient) TreatPromise(ctx context.Context, in *Promise, opts ...grpc.CallOption) (*api1.ErrorCode, error) {
	out := new(api1.ErrorCode)
	err := grpc.Invoke(ctx, "/api.Client/TreatPromise", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clientClient) TreatSignature(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*api1.ErrorCode, error) {
	out := new(api1.ErrorCode)
	err := grpc.Invoke(ctx, "/api.Client/TreatSignature", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *clientClient) Discover(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*Hello, error) {
	out := new(Hello)
	err := grpc.Invoke(ctx, "/api.Client/Discover", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Client service

type ClientServer interface {
	TreatPromise(context.Context, *Promise) (*api1.ErrorCode, error)
	TreatSignature(context.Context, *Signature) (*api1.ErrorCode, error)
	Discover(context.Context, *Hello) (*Hello, error)
}

func RegisterClientServer(s *grpc.Server, srv ClientServer) {
	s.RegisterService(&_Client_serviceDesc, srv)
}

func _Client_TreatPromise_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
	in := new(Promise)
	if err := dec(in); err != nil {
		return nil, err
	}
	out, err := srv.(ClientServer).TreatPromise(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func _Client_TreatSignature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
	in := new(Signature)
	if err := dec(in); err != nil {
		return nil, err
	}
	out, err := srv.(ClientServer).TreatSignature(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func _Client_Discover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
	in := new(Hello)
	if err := dec(in); err != nil {
		return nil, err
	}
	out, err := srv.(ClientServer).Discover(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}

var _Client_serviceDesc = grpc.ServiceDesc{
	ServiceName: "api.Client",
	HandlerType: (*ClientServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TreatPromise",
			Handler:    _Client_TreatPromise_Handler,
		},
		{
			MethodName: "TreatSignature",
			Handler:    _Client_TreatSignature_Handler,
		},
		{
			MethodName: "Discover",
			Handler:    _Client_Discover_Handler,
		},
	},
	Streams: []grpc.StreamDesc{},
}

var fileDescriptor0 = []byte{
Caro Axel's avatar
Caro Axel committed
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
	// 380 bytes of a gzipped FileDescriptorProto
	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