pb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChainType_name = map[int32]string{
	0: "ONELEDGER",
	1: "BITCOIN",
	2: "ETHEREUM",
}
View Source
var ChainType_value = map[string]int32{
	"ONELEDGER": 0,
	"BITCOIN":   1,
	"ETHEREUM":  2,
}
View Source
var Currency_name = map[int32]string{
	0: "OLT",
	1: "BTC",
	2: "ETH",
}
View Source
var Currency_value = map[string]int32{
	"OLT": 0,
	"BTC": 1,
	"ETH": 2,
}

Functions

func RegisterSDKServer

func RegisterSDKServer(s *grpc.Server, srv SDKServer)

Types

type Balance

type Balance struct {
	Amount               int64    `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Currency             Currency `protobuf:"varint,2,opt,name=currency,proto3,enum=pb.Currency" json:"currency,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Balance) Descriptor

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

func (*Balance) GetAmount

func (m *Balance) GetAmount() int64

func (*Balance) GetCurrency

func (m *Balance) GetCurrency() Currency

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) Reset

func (m *Balance) Reset()

func (*Balance) String

func (m *Balance) String() string

func (*Balance) XXX_DiscardUnknown

func (m *Balance) XXX_DiscardUnknown()

func (*Balance) XXX_Marshal

func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Balance) XXX_Merge

func (m *Balance) XXX_Merge(src proto.Message)

func (*Balance) XXX_Size

func (m *Balance) XXX_Size() int

func (*Balance) XXX_Unmarshal

func (m *Balance) XXX_Unmarshal(b []byte) error

type ChainType

type ChainType int32
const (
	ChainType_ONELEDGER ChainType = 0
	ChainType_BITCOIN   ChainType = 1
	ChainType_ETHEREUM  ChainType = 2
)

func (ChainType) EnumDescriptor

func (ChainType) EnumDescriptor() ([]byte, []int)

func (ChainType) String

func (x ChainType) String() string

type CheckAccountReply

type CheckAccountReply struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Chain      string `protobuf:"bytes,2,opt,name=chain,proto3" json:"chain,omitempty"`
	AccountKey []byte `protobuf:"bytes,3,opt,name=accountKey,proto3" json:"accountKey,omitempty"`
	// TODO: Should use Coin message
	Balance              *Balance `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CheckAccountReply) Descriptor

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

func (*CheckAccountReply) GetAccountKey

func (m *CheckAccountReply) GetAccountKey() []byte

func (*CheckAccountReply) GetBalance

func (m *CheckAccountReply) GetBalance() *Balance

func (*CheckAccountReply) GetChain

func (m *CheckAccountReply) GetChain() string

func (*CheckAccountReply) GetName

func (m *CheckAccountReply) GetName() string

func (*CheckAccountReply) ProtoMessage

func (*CheckAccountReply) ProtoMessage()

func (*CheckAccountReply) Reset

func (m *CheckAccountReply) Reset()

func (*CheckAccountReply) String

func (m *CheckAccountReply) String() string

func (*CheckAccountReply) XXX_DiscardUnknown

func (m *CheckAccountReply) XXX_DiscardUnknown()

func (*CheckAccountReply) XXX_Marshal

func (m *CheckAccountReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckAccountReply) XXX_Merge

func (m *CheckAccountReply) XXX_Merge(src proto.Message)

func (*CheckAccountReply) XXX_Size

func (m *CheckAccountReply) XXX_Size() int

func (*CheckAccountReply) XXX_Unmarshal

func (m *CheckAccountReply) XXX_Unmarshal(b []byte) error

type CheckAccountRequest

type CheckAccountRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CheckAccountRequest) Descriptor

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

func (*CheckAccountRequest) GetName

func (m *CheckAccountRequest) GetName() string

func (*CheckAccountRequest) ProtoMessage

func (*CheckAccountRequest) ProtoMessage()

func (*CheckAccountRequest) Reset

func (m *CheckAccountRequest) Reset()

func (*CheckAccountRequest) String

func (m *CheckAccountRequest) String() string

func (*CheckAccountRequest) XXX_DiscardUnknown

func (m *CheckAccountRequest) XXX_DiscardUnknown()

func (*CheckAccountRequest) XXX_Marshal

func (m *CheckAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckAccountRequest) XXX_Merge

func (m *CheckAccountRequest) XXX_Merge(src proto.Message)

func (*CheckAccountRequest) XXX_Size

func (m *CheckAccountRequest) XXX_Size() int

func (*CheckAccountRequest) XXX_Unmarshal

func (m *CheckAccountRequest) XXX_Unmarshal(b []byte) error

type Currency

type Currency int32
const (
	Currency_OLT Currency = 0
	Currency_BTC Currency = 1
	Currency_ETH Currency = 2
)

func (Currency) EnumDescriptor

func (Currency) EnumDescriptor() ([]byte, []int)

func (Currency) String

func (x Currency) String() string

type RegisterReply

type RegisterReply struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Identity             string   `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	PublicKey            []byte   `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	PrivateKey           []byte   `protobuf:"bytes,4,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterReply) Descriptor

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

func (*RegisterReply) GetIdentity

func (m *RegisterReply) GetIdentity() string

func (*RegisterReply) GetOk

func (m *RegisterReply) GetOk() bool

func (*RegisterReply) GetPrivateKey

func (m *RegisterReply) GetPrivateKey() []byte

func (*RegisterReply) GetPublicKey

func (m *RegisterReply) GetPublicKey() []byte

func (*RegisterReply) ProtoMessage

func (*RegisterReply) ProtoMessage()

func (*RegisterReply) Reset

func (m *RegisterReply) Reset()

func (*RegisterReply) String

func (m *RegisterReply) String() string

func (*RegisterReply) XXX_DiscardUnknown

func (m *RegisterReply) XXX_DiscardUnknown()

func (*RegisterReply) XXX_Marshal

func (m *RegisterReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterReply) XXX_Merge

func (m *RegisterReply) XXX_Merge(src proto.Message)

func (*RegisterReply) XXX_Size

func (m *RegisterReply) XXX_Size() int

func (*RegisterReply) XXX_Unmarshal

func (m *RegisterReply) XXX_Unmarshal(b []byte) error

type RegisterRequest

type RegisterRequest struct {
	Identity             string    `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	Chain                ChainType `protobuf:"varint,2,opt,name=chain,proto3,enum=pb.ChainType" json:"chain,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*RegisterRequest) Descriptor

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

func (*RegisterRequest) GetChain

func (m *RegisterRequest) GetChain() ChainType

func (*RegisterRequest) GetIdentity

func (m *RegisterRequest) GetIdentity() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) Reset

func (m *RegisterRequest) Reset()

func (*RegisterRequest) String

func (m *RegisterRequest) String() string

func (*RegisterRequest) XXX_DiscardUnknown

func (m *RegisterRequest) XXX_DiscardUnknown()

func (*RegisterRequest) XXX_Marshal

func (m *RegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterRequest) XXX_Merge

func (m *RegisterRequest) XXX_Merge(src proto.Message)

func (*RegisterRequest) XXX_Size

func (m *RegisterRequest) XXX_Size() int

func (*RegisterRequest) XXX_Unmarshal

func (m *RegisterRequest) XXX_Unmarshal(b []byte) error

type SDKClient

type SDKClient interface {
	// Simple health-check to see if the server is OK
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
	CheckAccount(ctx context.Context, in *CheckAccountRequest, opts ...grpc.CallOption) (*CheckAccountReply, error)
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendReply, error)
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
}

SDKClient is the client API for SDK service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSDKClient

func NewSDKClient(cc *grpc.ClientConn) SDKClient

type SDKServer

type SDKServer interface {
	// Simple health-check to see if the server is OK
	Status(context.Context, *StatusRequest) (*StatusReply, error)
	CheckAccount(context.Context, *CheckAccountRequest) (*CheckAccountReply, error)
	Send(context.Context, *SendRequest) (*SendReply, error)
	Register(context.Context, *RegisterRequest) (*RegisterReply, error)
}

SDKServer is the server API for SDK service.

type SendReply

type SendReply struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Reason               string   `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Just send an ok back for now

func (*SendReply) Descriptor

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

func (*SendReply) GetOk

func (m *SendReply) GetOk() bool

func (*SendReply) GetReason

func (m *SendReply) GetReason() string

func (*SendReply) ProtoMessage

func (*SendReply) ProtoMessage()

func (*SendReply) Reset

func (m *SendReply) Reset()

func (*SendReply) String

func (m *SendReply) String() string

func (*SendReply) XXX_DiscardUnknown

func (m *SendReply) XXX_DiscardUnknown()

func (*SendReply) XXX_Marshal

func (m *SendReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendReply) XXX_Merge

func (m *SendReply) XXX_Merge(src proto.Message)

func (*SendReply) XXX_Size

func (m *SendReply) XXX_Size() int

func (*SendReply) XXX_Unmarshal

func (m *SendReply) XXX_Unmarshal(b []byte) error

type SendRequest

type SendRequest struct {
	Party                string   `protobuf:"bytes,1,opt,name=party,proto3" json:"party,omitempty"`
	CounterParty         string   `protobuf:"bytes,2,opt,name=counterParty,proto3" json:"counterParty,omitempty"`
	Currency             Currency `protobuf:"varint,3,opt,name=currency,proto3,enum=pb.Currency" json:"currency,omitempty"`
	Amount               int64    `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Gas                  int64    `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"`
	Fee                  int64    `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendRequest) Descriptor

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

func (*SendRequest) GetAmount

func (m *SendRequest) GetAmount() int64

func (*SendRequest) GetCounterParty

func (m *SendRequest) GetCounterParty() string

func (*SendRequest) GetCurrency

func (m *SendRequest) GetCurrency() Currency

func (*SendRequest) GetFee

func (m *SendRequest) GetFee() int64

func (*SendRequest) GetGas

func (m *SendRequest) GetGas() int64

func (*SendRequest) GetParty

func (m *SendRequest) GetParty() string

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) Reset

func (m *SendRequest) Reset()

func (*SendRequest) String

func (m *SendRequest) String() string

func (*SendRequest) XXX_DiscardUnknown

func (m *SendRequest) XXX_DiscardUnknown()

func (*SendRequest) XXX_Marshal

func (m *SendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendRequest) XXX_Merge

func (m *SendRequest) XXX_Merge(src proto.Message)

func (*SendRequest) XXX_Size

func (m *SendRequest) XXX_Size() int

func (*SendRequest) XXX_Unmarshal

func (m *SendRequest) XXX_Unmarshal(b []byte) error

type StatusReply

type StatusReply struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StatusReply) Descriptor

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

func (*StatusReply) GetOk

func (m *StatusReply) GetOk() bool

func (*StatusReply) ProtoMessage

func (*StatusReply) ProtoMessage()

func (*StatusReply) Reset

func (m *StatusReply) Reset()

func (*StatusReply) String

func (m *StatusReply) String() string

func (*StatusReply) XXX_DiscardUnknown

func (m *StatusReply) XXX_DiscardUnknown()

func (*StatusReply) XXX_Marshal

func (m *StatusReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusReply) XXX_Merge

func (m *StatusReply) XXX_Merge(src proto.Message)

func (*StatusReply) XXX_Size

func (m *StatusReply) XXX_Size() int

func (*StatusReply) XXX_Unmarshal

func (m *StatusReply) XXX_Unmarshal(b []byte) error

type StatusRequest

type StatusRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Custom empty message in case we want to add new parameters in the future

func (*StatusRequest) Descriptor

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

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) String

func (m *StatusRequest) String() string

func (*StatusRequest) XXX_DiscardUnknown

func (m *StatusRequest) XXX_DiscardUnknown()

func (*StatusRequest) XXX_Marshal

func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusRequest) XXX_Merge

func (m *StatusRequest) XXX_Merge(src proto.Message)

func (*StatusRequest) XXX_Size

func (m *StatusRequest) XXX_Size() int

func (*StatusRequest) XXX_Unmarshal

func (m *StatusRequest) XXX_Unmarshal(b []byte) error

type SwapReply

type SwapReply struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SwapReply) Descriptor

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

func (*SwapReply) ProtoMessage

func (*SwapReply) ProtoMessage()

func (*SwapReply) Reset

func (m *SwapReply) Reset()

func (*SwapReply) String

func (m *SwapReply) String() string

func (*SwapReply) XXX_DiscardUnknown

func (m *SwapReply) XXX_DiscardUnknown()

func (*SwapReply) XXX_Marshal

func (m *SwapReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwapReply) XXX_Merge

func (m *SwapReply) XXX_Merge(src proto.Message)

func (*SwapReply) XXX_Size

func (m *SwapReply) XXX_Size() int

func (*SwapReply) XXX_Unmarshal

func (m *SwapReply) XXX_Unmarshal(b []byte) error

type SwapRequest

type SwapRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SwapRequest) Descriptor

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

func (*SwapRequest) ProtoMessage

func (*SwapRequest) ProtoMessage()

func (*SwapRequest) Reset

func (m *SwapRequest) Reset()

func (*SwapRequest) String

func (m *SwapRequest) String() string

func (*SwapRequest) XXX_DiscardUnknown

func (m *SwapRequest) XXX_DiscardUnknown()

func (*SwapRequest) XXX_Marshal

func (m *SwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SwapRequest) XXX_Merge

func (m *SwapRequest) XXX_Merge(src proto.Message)

func (*SwapRequest) XXX_Size

func (m *SwapRequest) XXX_Size() int

func (*SwapRequest) XXX_Unmarshal

func (m *SwapRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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