funpb

package
v0.0.5-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package funpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFundingServiceHandler

func RegisterFundingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterFundingServiceHandler registers the http handlers for service FundingService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterFundingServiceHandlerClient

func RegisterFundingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FundingServiceClient) error

RegisterFundingServiceHandlerClient registers the http handlers for service FundingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FundingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FundingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FundingServiceClient" to call the correct interceptors.

func RegisterFundingServiceHandlerFromEndpoint

func RegisterFundingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterFundingServiceHandlerFromEndpoint is same as RegisterFundingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterFundingServiceServer

func RegisterFundingServiceServer(s *grpc.Server, srv FundingServiceServer)

Types

type FundingCreatePayload

type FundingCreatePayload struct {
	DocumentId           string       `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
	Data                 *FundingData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*FundingCreatePayload) Descriptor

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

func (*FundingCreatePayload) GetData

func (m *FundingCreatePayload) GetData() *FundingData

func (*FundingCreatePayload) GetDocumentId

func (m *FundingCreatePayload) GetDocumentId() string

func (*FundingCreatePayload) ProtoMessage

func (*FundingCreatePayload) ProtoMessage()

func (*FundingCreatePayload) Reset

func (m *FundingCreatePayload) Reset()

func (*FundingCreatePayload) String

func (m *FundingCreatePayload) String() string

func (*FundingCreatePayload) XXX_DiscardUnknown

func (m *FundingCreatePayload) XXX_DiscardUnknown()

func (*FundingCreatePayload) XXX_Marshal

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

func (*FundingCreatePayload) XXX_Merge

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

func (*FundingCreatePayload) XXX_Size

func (m *FundingCreatePayload) XXX_Size() int

func (*FundingCreatePayload) XXX_Unmarshal

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

type FundingData

type FundingData struct {
	AgreementId           string   `protobuf:"bytes,1,opt,name=agreement_id,json=agreementId,proto3" json:"agreement_id,omitempty"`
	Amount                string   `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	Apr                   string   `protobuf:"bytes,3,opt,name=apr,proto3" json:"apr,omitempty"`
	Days                  string   `protobuf:"bytes,4,opt,name=days,proto3" json:"days,omitempty"`
	Fee                   string   `protobuf:"bytes,5,opt,name=fee,proto3" json:"fee,omitempty"`
	RepaymentDueDate      string   `protobuf:"bytes,7,opt,name=repayment_due_date,json=repaymentDueDate,proto3" json:"repayment_due_date,omitempty"`
	RepaymentOccurredDate string   `` /* 126-byte string literal not displayed */
	RepaymentAmount       string   `protobuf:"bytes,9,opt,name=repayment_amount,json=repaymentAmount,proto3" json:"repayment_amount,omitempty"`
	Currency              string   `protobuf:"bytes,10,opt,name=currency,proto3" json:"currency,omitempty"`
	NftAddress            string   `protobuf:"bytes,11,opt,name=nft_address,json=nftAddress,proto3" json:"nft_address,omitempty"`
	PaymentDetailsId      string   `protobuf:"bytes,12,opt,name=payment_details_id,json=paymentDetailsId,proto3" json:"payment_details_id,omitempty"`
	FunderId              string   `protobuf:"bytes,13,opt,name=funder_id,json=funderId,proto3" json:"funder_id,omitempty"`
	BorrowerId            string   `protobuf:"bytes,14,opt,name=borrower_id,json=borrowerId,proto3" json:"borrower_id,omitempty"`
	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
	XXX_unrecognized      []byte   `json:"-"`
	XXX_sizecache         int32    `json:"-"`
}

FundingData is the default funding extension schema

func (*FundingData) Descriptor

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

func (*FundingData) GetAgreementId

func (m *FundingData) GetAgreementId() string

func (*FundingData) GetAmount

func (m *FundingData) GetAmount() string

func (*FundingData) GetApr

func (m *FundingData) GetApr() string

func (*FundingData) GetBorrowerId

func (m *FundingData) GetBorrowerId() string

func (*FundingData) GetCurrency

func (m *FundingData) GetCurrency() string

func (*FundingData) GetDays

func (m *FundingData) GetDays() string

func (*FundingData) GetFee

func (m *FundingData) GetFee() string

func (*FundingData) GetFunderId

func (m *FundingData) GetFunderId() string

func (*FundingData) GetNftAddress

func (m *FundingData) GetNftAddress() string

func (*FundingData) GetPaymentDetailsId

func (m *FundingData) GetPaymentDetailsId() string

func (*FundingData) GetRepaymentAmount

func (m *FundingData) GetRepaymentAmount() string

func (*FundingData) GetRepaymentDueDate

func (m *FundingData) GetRepaymentDueDate() string

func (*FundingData) GetRepaymentOccurredDate

func (m *FundingData) GetRepaymentOccurredDate() string

func (*FundingData) ProtoMessage

func (*FundingData) ProtoMessage()

func (*FundingData) Reset

func (m *FundingData) Reset()

func (*FundingData) String

func (m *FundingData) String() string

func (*FundingData) XXX_DiscardUnknown

func (m *FundingData) XXX_DiscardUnknown()

func (*FundingData) XXX_Marshal

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

func (*FundingData) XXX_Merge

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

func (*FundingData) XXX_Size

func (m *FundingData) XXX_Size() int

func (*FundingData) XXX_Unmarshal

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

type FundingListResponse

type FundingListResponse struct {
	Header               *document.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data                 []*FundingResponseData   `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*FundingListResponse) Descriptor

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

func (*FundingListResponse) GetData

func (m *FundingListResponse) GetData() []*FundingResponseData

func (*FundingListResponse) GetHeader

func (*FundingListResponse) ProtoMessage

func (*FundingListResponse) ProtoMessage()

func (*FundingListResponse) Reset

func (m *FundingListResponse) Reset()

func (*FundingListResponse) String

func (m *FundingListResponse) String() string

func (*FundingListResponse) XXX_DiscardUnknown

func (m *FundingListResponse) XXX_DiscardUnknown()

func (*FundingListResponse) XXX_Marshal

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

func (*FundingListResponse) XXX_Merge

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

func (*FundingListResponse) XXX_Size

func (m *FundingListResponse) XXX_Size() int

func (*FundingListResponse) XXX_Unmarshal

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

type FundingResponse

type FundingResponse struct {
	Header               *document.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data                 *FundingResponseData     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*FundingResponse) Descriptor

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

func (*FundingResponse) GetData

func (m *FundingResponse) GetData() *FundingResponseData

func (*FundingResponse) GetHeader

func (m *FundingResponse) GetHeader() *document.ResponseHeader

func (*FundingResponse) ProtoMessage

func (*FundingResponse) ProtoMessage()

func (*FundingResponse) Reset

func (m *FundingResponse) Reset()

func (*FundingResponse) String

func (m *FundingResponse) String() string

func (*FundingResponse) XXX_DiscardUnknown

func (m *FundingResponse) XXX_DiscardUnknown()

func (*FundingResponse) XXX_Marshal

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

func (*FundingResponse) XXX_Merge

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

func (*FundingResponse) XXX_Size

func (m *FundingResponse) XXX_Size() int

func (*FundingResponse) XXX_Unmarshal

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

type FundingResponseData

type FundingResponseData struct {
	Funding              *FundingData        `protobuf:"bytes,1,opt,name=funding,proto3" json:"funding,omitempty"`
	Signatures           []*FundingSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*FundingResponseData) Descriptor

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

func (*FundingResponseData) GetFunding

func (m *FundingResponseData) GetFunding() *FundingData

func (*FundingResponseData) GetSignatures

func (m *FundingResponseData) GetSignatures() []*FundingSignature

func (*FundingResponseData) ProtoMessage

func (*FundingResponseData) ProtoMessage()

func (*FundingResponseData) Reset

func (m *FundingResponseData) Reset()

func (*FundingResponseData) String

func (m *FundingResponseData) String() string

func (*FundingResponseData) XXX_DiscardUnknown

func (m *FundingResponseData) XXX_DiscardUnknown()

func (*FundingResponseData) XXX_Marshal

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

func (*FundingResponseData) XXX_Merge

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

func (*FundingResponseData) XXX_Size

func (m *FundingResponseData) XXX_Size() int

func (*FundingResponseData) XXX_Unmarshal

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

type FundingServiceClient

type FundingServiceClient interface {
	Create(ctx context.Context, in *FundingCreatePayload, opts ...grpc.CallOption) (*FundingResponse, error)
	Update(ctx context.Context, in *FundingUpdatePayload, opts ...grpc.CallOption) (*FundingResponse, error)
	Sign(ctx context.Context, in *Request, opts ...grpc.CallOption) (*FundingResponse, error)
	Get(ctx context.Context, in *Request, opts ...grpc.CallOption) (*FundingResponse, error)
	GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*FundingResponse, error)
	GetList(ctx context.Context, in *GetListRequest, opts ...grpc.CallOption) (*FundingListResponse, error)
	GetListVersion(ctx context.Context, in *GetListVersionRequest, opts ...grpc.CallOption) (*FundingListResponse, error)
}

FundingServiceClient is the client API for FundingService service.

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

func NewFundingServiceClient

func NewFundingServiceClient(cc *grpc.ClientConn) FundingServiceClient

type FundingServiceServer

FundingServiceServer is the server API for FundingService service.

type FundingSignature

type FundingSignature struct {
	Valid                string   `protobuf:"bytes,1,opt,name=valid,proto3" json:"valid,omitempty"`
	OutdatedSignature    string   `protobuf:"bytes,2,opt,name=outdated_signature,json=outdatedSignature,proto3" json:"outdated_signature,omitempty"`
	Identity             string   `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
	SignedVersion        string   `protobuf:"bytes,4,opt,name=signed_version,json=signedVersion,proto3" json:"signed_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FundingSignature) Descriptor

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

func (*FundingSignature) GetIdentity

func (m *FundingSignature) GetIdentity() string

func (*FundingSignature) GetOutdatedSignature

func (m *FundingSignature) GetOutdatedSignature() string

func (*FundingSignature) GetSignedVersion

func (m *FundingSignature) GetSignedVersion() string

func (*FundingSignature) GetValid

func (m *FundingSignature) GetValid() string

func (*FundingSignature) ProtoMessage

func (*FundingSignature) ProtoMessage()

func (*FundingSignature) Reset

func (m *FundingSignature) Reset()

func (*FundingSignature) String

func (m *FundingSignature) String() string

func (*FundingSignature) XXX_DiscardUnknown

func (m *FundingSignature) XXX_DiscardUnknown()

func (*FundingSignature) XXX_Marshal

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

func (*FundingSignature) XXX_Merge

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

func (*FundingSignature) XXX_Size

func (m *FundingSignature) XXX_Size() int

func (*FundingSignature) XXX_Unmarshal

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

type FundingUpdatePayload

type FundingUpdatePayload struct {
	DocumentId           string       `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
	AgreementId          string       `protobuf:"bytes,2,opt,name=agreement_id,json=agreementId,proto3" json:"agreement_id,omitempty"`
	Data                 *FundingData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*FundingUpdatePayload) Descriptor

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

func (*FundingUpdatePayload) GetAgreementId

func (m *FundingUpdatePayload) GetAgreementId() string

func (*FundingUpdatePayload) GetData

func (m *FundingUpdatePayload) GetData() *FundingData

func (*FundingUpdatePayload) GetDocumentId

func (m *FundingUpdatePayload) GetDocumentId() string

func (*FundingUpdatePayload) ProtoMessage

func (*FundingUpdatePayload) ProtoMessage()

func (*FundingUpdatePayload) Reset

func (m *FundingUpdatePayload) Reset()

func (*FundingUpdatePayload) String

func (m *FundingUpdatePayload) String() string

func (*FundingUpdatePayload) XXX_DiscardUnknown

func (m *FundingUpdatePayload) XXX_DiscardUnknown()

func (*FundingUpdatePayload) XXX_Marshal

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

func (*FundingUpdatePayload) XXX_Merge

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

func (*FundingUpdatePayload) XXX_Size

func (m *FundingUpdatePayload) XXX_Size() int

func (*FundingUpdatePayload) XXX_Unmarshal

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

type GetListRequest

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

func (*GetListRequest) Descriptor

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

func (*GetListRequest) GetDocumentId

func (m *GetListRequest) GetDocumentId() string

func (*GetListRequest) ProtoMessage

func (*GetListRequest) ProtoMessage()

func (*GetListRequest) Reset

func (m *GetListRequest) Reset()

func (*GetListRequest) String

func (m *GetListRequest) String() string

func (*GetListRequest) XXX_DiscardUnknown

func (m *GetListRequest) XXX_DiscardUnknown()

func (*GetListRequest) XXX_Marshal

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

func (*GetListRequest) XXX_Merge

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

func (*GetListRequest) XXX_Size

func (m *GetListRequest) XXX_Size() int

func (*GetListRequest) XXX_Unmarshal

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

type GetListVersionRequest

type GetListVersionRequest struct {
	DocumentId           string   `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
	VersionId            string   `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetListVersionRequest) Descriptor

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

func (*GetListVersionRequest) GetDocumentId

func (m *GetListVersionRequest) GetDocumentId() string

func (*GetListVersionRequest) GetVersionId

func (m *GetListVersionRequest) GetVersionId() string

func (*GetListVersionRequest) ProtoMessage

func (*GetListVersionRequest) ProtoMessage()

func (*GetListVersionRequest) Reset

func (m *GetListVersionRequest) Reset()

func (*GetListVersionRequest) String

func (m *GetListVersionRequest) String() string

func (*GetListVersionRequest) XXX_DiscardUnknown

func (m *GetListVersionRequest) XXX_DiscardUnknown()

func (*GetListVersionRequest) XXX_Marshal

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

func (*GetListVersionRequest) XXX_Merge

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

func (*GetListVersionRequest) XXX_Size

func (m *GetListVersionRequest) XXX_Size() int

func (*GetListVersionRequest) XXX_Unmarshal

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

type GetVersionRequest

type GetVersionRequest struct {
	DocumentId           string   `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
	VersionId            string   `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"`
	AgreementId          string   `protobuf:"bytes,3,opt,name=agreement_id,json=agreementId,proto3" json:"agreement_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetVersionRequest) Descriptor

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

func (*GetVersionRequest) GetAgreementId

func (m *GetVersionRequest) GetAgreementId() string

func (*GetVersionRequest) GetDocumentId

func (m *GetVersionRequest) GetDocumentId() string

func (*GetVersionRequest) GetVersionId

func (m *GetVersionRequest) GetVersionId() string

func (*GetVersionRequest) ProtoMessage

func (*GetVersionRequest) ProtoMessage()

func (*GetVersionRequest) Reset

func (m *GetVersionRequest) Reset()

func (*GetVersionRequest) String

func (m *GetVersionRequest) String() string

func (*GetVersionRequest) XXX_DiscardUnknown

func (m *GetVersionRequest) XXX_DiscardUnknown()

func (*GetVersionRequest) XXX_Marshal

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

func (*GetVersionRequest) XXX_Merge

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

func (*GetVersionRequest) XXX_Size

func (m *GetVersionRequest) XXX_Size() int

func (*GetVersionRequest) XXX_Unmarshal

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

type Request

type Request struct {
	DocumentId           string   `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"`
	AgreementId          string   `protobuf:"bytes,2,opt,name=agreement_id,json=agreementId,proto3" json:"agreement_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetAgreementId

func (m *Request) GetAgreementId() string

func (*Request) GetDocumentId

func (m *Request) GetDocumentId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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