v1

package
v0.0.1-rc11 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "escrow"

	// StoreKey is the store key string for deployment
	StoreKey = ModuleName

	// RouterKey is the message route for deployment
	RouterKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthAccountid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccountid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccountid = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrAccountExists           = cerrors.Register(ModuleName, errAccountExists, "account exists")
	ErrAccountClosed           = cerrors.Register(ModuleName, errAccountClosed, "account closed")
	ErrAccountNotFound         = cerrors.Register(ModuleName, errAccountNotFound, "account not found")
	ErrAccountOverdrawn        = cerrors.Register(ModuleName, errAccountOverdrawn, "account overdrawn")
	ErrInvalidDenomination     = cerrors.Register(ModuleName, errInvalidDenomination, "invalid denomination")
	ErrPaymentExists           = cerrors.Register(ModuleName, errPaymentExists, "payment exists")
	ErrPaymentClosed           = cerrors.Register(ModuleName, errPaymentClosed, "payment closed")
	ErrPaymentNotFound         = cerrors.Register(ModuleName, errPaymentNotFound, "payment not found")
	ErrPaymentRateZero         = cerrors.Register(ModuleName, errPaymentRateZero, "payment rate zero")
	ErrInvalidPayment          = cerrors.Register(ModuleName, errInvalidPayment, "invalid payment")
	ErrInvalidSettlement       = cerrors.Register(ModuleName, errInvalidSettlement, "invalid settlement")
	ErrInvalidAccountID        = cerrors.Register(ModuleName, errInvalidAccountID, "invalid account ID")
	ErrInvalidAccount          = cerrors.Register(ModuleName, errInvalidAccount, "invalid account")
	ErrInvalidAccountDepositor = cerrors.Register(ModuleName, errInvalidAccountDepositor, "invalid account depositor")
)
View Source
var (
	ErrInvalidLengthFractionalPayment        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFractionalPayment          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFractionalPayment = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Account_State_name = map[int32]string{
	0: "invalid",
	1: "open",
	2: "closed",
	3: "overdrawn",
}
View Source
var Account_State_value = map[string]int32{
	"invalid":   0,
	"open":      1,
	"closed":    2,
	"overdrawn": 3,
}
View Source
var FractionalPayment_State_name = map[int32]string{
	0: "invalid",
	1: "open",
	2: "closed",
	3: "overdrawn",
}
View Source
var FractionalPayment_State_value = map[string]int32{
	"invalid":   0,
	"open":      1,
	"closed":    2,
	"overdrawn": 3,
}

Functions

func AccountKeyPrefix

func AccountKeyPrefix() []byte

func PaymentKeyPrefix

func PaymentKeyPrefix() []byte

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/provider interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(_ *codec.LegacyAmino)

RegisterLegacyAminoCodec register concrete types on codec

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Account

type Account struct {
	// unique identifier for this escrow account
	ID AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// bech32 encoded account address of the owner of this escrow account
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner" yaml:"owner"`
	// current state of this escrow account
	State Account_State `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.v1.Account_State" json:"state" yaml:"state"`
	// unspent coins received from the owner's wallet
	Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"`
	// total coins spent by this account
	Transferred types.DecCoin `protobuf:"bytes,5,opt,name=transferred,proto3" json:"transferred" yaml:"transferred"`
	// block height at which this account was last settled
	SettledAt int64 `protobuf:"varint,6,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"`
	// bech32 encoded account address of the depositor.
	// If depositor is same as the owner, then any incoming coins are added to the Balance.
	// If depositor isn't same as the owner, then any incoming coins are added to the Funds.
	Depositor string `protobuf:"bytes,7,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"`
	// Funds are unspent coins received from the (non-Owner) Depositor's wallet.
	// If there are any funds, they should be spent before spending the Balance.
	Funds types.DecCoin `protobuf:"bytes,8,opt,name=funds,proto3" json:"funds" yaml:"funds"`
}

Account stores state for an escrow account

func (*Account) Descriptor

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

func (*Account) GetBalance

func (m *Account) GetBalance() types.DecCoin

func (*Account) GetDepositor

func (m *Account) GetDepositor() string

func (*Account) GetFunds

func (m *Account) GetFunds() types.DecCoin

func (*Account) GetID

func (m *Account) GetID() AccountID

func (*Account) GetOwner

func (m *Account) GetOwner() string

func (*Account) GetSettledAt

func (m *Account) GetSettledAt() int64

func (*Account) GetState

func (m *Account) GetState() Account_State

func (*Account) GetTransferred

func (m *Account) GetTransferred() types.DecCoin

func (*Account) HasDepositor

func (m *Account) HasDepositor() bool

func (*Account) Marshal

func (m *Account) Marshal() (dAtA []byte, err error)

func (*Account) MarshalTo

func (m *Account) MarshalTo(dAtA []byte) (int, error)

func (*Account) MarshalToSizedBuffer

func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

func (m *Account) Size() (n int)

func (*Account) String

func (m *Account) String() string

func (*Account) TotalBalance

func (m *Account) TotalBalance() sdk.DecCoin

TotalBalance is the sum of Balance and Funds

func (*Account) Unmarshal

func (m *Account) Unmarshal(dAtA []byte) error

func (*Account) ValidateBasic

func (m *Account) ValidateBasic() error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

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

func (*Account) XXX_Merge

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

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

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

type AccountID

type AccountID struct {
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope" yaml:"scope"`
	XID   string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid" yaml:"xid"`
}

AccountID is the account identifier

func (*AccountID) Descriptor

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

func (*AccountID) GetScope

func (m *AccountID) GetScope() string

func (*AccountID) GetXID

func (m *AccountID) GetXID() string

func (*AccountID) Marshal

func (m *AccountID) Marshal() (dAtA []byte, err error)

func (*AccountID) MarshalTo

func (m *AccountID) MarshalTo(dAtA []byte) (int, error)

func (*AccountID) MarshalToSizedBuffer

func (m *AccountID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccountID) ProtoMessage

func (*AccountID) ProtoMessage()

func (*AccountID) Reset

func (m *AccountID) Reset()

func (*AccountID) Size

func (m *AccountID) Size() (n int)

func (*AccountID) String

func (m *AccountID) String() string

func (*AccountID) Unmarshal

func (m *AccountID) Unmarshal(dAtA []byte) error

func (*AccountID) ValidateBasic

func (obj *AccountID) ValidateBasic() error

func (*AccountID) XXX_DiscardUnknown

func (m *AccountID) XXX_DiscardUnknown()

func (*AccountID) XXX_Marshal

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

func (*AccountID) XXX_Merge

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

func (*AccountID) XXX_Size

func (m *AccountID) XXX_Size() int

func (*AccountID) XXX_Unmarshal

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

type Account_State

type Account_State int32

State stores state for an escrow account

const (
	// AccountStateInvalid is an invalid state
	AccountStateInvalid Account_State = 0
	// AccountOpen is the state when an account is open
	AccountOpen Account_State = 1
	// AccountClosed is the state when an account is closed
	AccountClosed Account_State = 2
	// AccountOverdrawn is the state when an account is overdrawn
	AccountOverdrawn Account_State = 3
)

func (Account_State) EnumDescriptor

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

func (Account_State) String

func (x Account_State) String() string

type Accounts

type Accounts []Account

type FractionalPayment

type FractionalPayment struct {
	AccountID AccountID               `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"accountID" yaml:"accountID"`
	PaymentID string                  `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"paymentID" yaml:"paymentID"`
	Owner     string                  `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" yaml:"owner"`
	State     FractionalPayment_State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1.FractionalPayment_State" json:"state" yaml:"state"`
	Rate      types.DecCoin           `protobuf:"bytes,5,opt,name=rate,proto3" json:"rate" yaml:"rate"`
	Balance   types.DecCoin           `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance" yaml:"balance"`
	Withdrawn types.Coin              `protobuf:"bytes,7,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"`
}

Payment stores state for a payment

func (*FractionalPayment) Descriptor

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

func (*FractionalPayment) GetAccountID

func (m *FractionalPayment) GetAccountID() AccountID

func (*FractionalPayment) GetBalance

func (m *FractionalPayment) GetBalance() types.DecCoin

func (*FractionalPayment) GetOwner

func (m *FractionalPayment) GetOwner() string

func (*FractionalPayment) GetPaymentID

func (m *FractionalPayment) GetPaymentID() string

func (*FractionalPayment) GetRate

func (m *FractionalPayment) GetRate() types.DecCoin

func (*FractionalPayment) GetState

func (*FractionalPayment) GetWithdrawn

func (m *FractionalPayment) GetWithdrawn() types.Coin

func (*FractionalPayment) Marshal

func (m *FractionalPayment) Marshal() (dAtA []byte, err error)

func (*FractionalPayment) MarshalTo

func (m *FractionalPayment) MarshalTo(dAtA []byte) (int, error)

func (*FractionalPayment) MarshalToSizedBuffer

func (m *FractionalPayment) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FractionalPayment) ProtoMessage

func (*FractionalPayment) ProtoMessage()

func (*FractionalPayment) Reset

func (m *FractionalPayment) Reset()

func (*FractionalPayment) Size

func (m *FractionalPayment) Size() (n int)

func (*FractionalPayment) String

func (m *FractionalPayment) String() string

func (*FractionalPayment) Unmarshal

func (m *FractionalPayment) Unmarshal(dAtA []byte) error

func (*FractionalPayment) ValidateBasic

func (obj *FractionalPayment) ValidateBasic() error

func (*FractionalPayment) XXX_DiscardUnknown

func (m *FractionalPayment) XXX_DiscardUnknown()

func (*FractionalPayment) XXX_Marshal

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

func (*FractionalPayment) XXX_Merge

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

func (*FractionalPayment) XXX_Size

func (m *FractionalPayment) XXX_Size() int

func (*FractionalPayment) XXX_Unmarshal

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

type FractionalPayment_State

type FractionalPayment_State int32

State defines payment state

const (
	// PaymentStateInvalid is the state when the payment is invalid
	PaymentStateInvalid FractionalPayment_State = 0
	// PaymentStateOpen is the state when the payment is open
	PaymentOpen FractionalPayment_State = 1
	// PaymentStateClosed is the state when the payment is closed
	PaymentClosed FractionalPayment_State = 2
	// PaymentStateOverdrawn is the state when the payment is overdrawn
	PaymentOverdrawn FractionalPayment_State = 3
)

func (FractionalPayment_State) EnumDescriptor

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

func (FractionalPayment_State) String

func (x FractionalPayment_State) String() string

type FractionalPayments

type FractionalPayments []FractionalPayment

type GenesisState

type GenesisState struct {
	Accounts Accounts           `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts" yaml:"accounts"`
	Payments FractionalPayments `protobuf:"bytes,2,rep,name=payments,proto3,castrepeated=FractionalPayments" json:"payments" yaml:"payments"`
}

GenesisState defines the basic genesis state used by the escrow module

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAccounts

func (m *GenesisState) GetAccounts() Accounts

func (*GenesisState) GetPayments

func (m *GenesisState) GetPayments() FractionalPayments

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type QueryAccountsRequest

type QueryAccountsRequest struct {
	Scope      string             `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	Xid        string             `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"`
	Owner      string             `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	State      string             `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAccountRequest is request type for the Query/Account RPC method

func (*QueryAccountsRequest) Descriptor

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

func (*QueryAccountsRequest) GetOwner

func (m *QueryAccountsRequest) GetOwner() string

func (*QueryAccountsRequest) GetPagination

func (m *QueryAccountsRequest) GetPagination() *query.PageRequest

func (*QueryAccountsRequest) GetScope

func (m *QueryAccountsRequest) GetScope() string

func (*QueryAccountsRequest) GetState

func (m *QueryAccountsRequest) GetState() string

func (*QueryAccountsRequest) GetXid

func (m *QueryAccountsRequest) GetXid() string

func (*QueryAccountsRequest) Marshal

func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error)

func (*QueryAccountsRequest) MarshalTo

func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAccountsRequest) MarshalToSizedBuffer

func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAccountsRequest) ProtoMessage

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size

func (m *QueryAccountsRequest) Size() (n int)

func (*QueryAccountsRequest) String

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal

func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error

func (*QueryAccountsRequest) XXX_DiscardUnknown

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal

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

func (*QueryAccountsRequest) XXX_Merge

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

func (*QueryAccountsRequest) XXX_Size

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal

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

type QueryAccountsResponse

type QueryAccountsResponse struct {
	Accounts   Accounts            `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProvidersResponse is response type for the Query/Providers RPC method

func (*QueryAccountsResponse) Descriptor

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

func (*QueryAccountsResponse) GetAccounts

func (m *QueryAccountsResponse) GetAccounts() Accounts

func (*QueryAccountsResponse) GetPagination

func (m *QueryAccountsResponse) GetPagination() *query.PageResponse

func (*QueryAccountsResponse) Marshal

func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error)

func (*QueryAccountsResponse) MarshalTo

func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAccountsResponse) MarshalToSizedBuffer

func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAccountsResponse) ProtoMessage

func (*QueryAccountsResponse) ProtoMessage()

func (*QueryAccountsResponse) Reset

func (m *QueryAccountsResponse) Reset()

func (*QueryAccountsResponse) Size

func (m *QueryAccountsResponse) Size() (n int)

func (*QueryAccountsResponse) String

func (m *QueryAccountsResponse) String() string

func (*QueryAccountsResponse) Unmarshal

func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error

func (*QueryAccountsResponse) XXX_DiscardUnknown

func (m *QueryAccountsResponse) XXX_DiscardUnknown()

func (*QueryAccountsResponse) XXX_Marshal

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

func (*QueryAccountsResponse) XXX_Merge

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

func (*QueryAccountsResponse) XXX_Size

func (m *QueryAccountsResponse) XXX_Size() int

func (*QueryAccountsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Accounts queries all accounts
	Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Payments queries all payments
	Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryPaymentsRequest

type QueryPaymentsRequest struct {
	Scope      string             `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	Xid        string             `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"`
	Id         string             `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Owner      string             `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	State      string             `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPaymentRequest is request type for the Query/Payment RPC method

func (*QueryPaymentsRequest) Descriptor

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

func (*QueryPaymentsRequest) GetId

func (m *QueryPaymentsRequest) GetId() string

func (*QueryPaymentsRequest) GetOwner

func (m *QueryPaymentsRequest) GetOwner() string

func (*QueryPaymentsRequest) GetPagination

func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest

func (*QueryPaymentsRequest) GetScope

func (m *QueryPaymentsRequest) GetScope() string

func (*QueryPaymentsRequest) GetState

func (m *QueryPaymentsRequest) GetState() string

func (*QueryPaymentsRequest) GetXid

func (m *QueryPaymentsRequest) GetXid() string

func (*QueryPaymentsRequest) Marshal

func (m *QueryPaymentsRequest) Marshal() (dAtA []byte, err error)

func (*QueryPaymentsRequest) MarshalTo

func (m *QueryPaymentsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPaymentsRequest) MarshalToSizedBuffer

func (m *QueryPaymentsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPaymentsRequest) ProtoMessage

func (*QueryPaymentsRequest) ProtoMessage()

func (*QueryPaymentsRequest) Reset

func (m *QueryPaymentsRequest) Reset()

func (*QueryPaymentsRequest) Size

func (m *QueryPaymentsRequest) Size() (n int)

func (*QueryPaymentsRequest) String

func (m *QueryPaymentsRequest) String() string

func (*QueryPaymentsRequest) Unmarshal

func (m *QueryPaymentsRequest) Unmarshal(dAtA []byte) error

func (*QueryPaymentsRequest) XXX_DiscardUnknown

func (m *QueryPaymentsRequest) XXX_DiscardUnknown()

func (*QueryPaymentsRequest) XXX_Marshal

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

func (*QueryPaymentsRequest) XXX_Merge

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

func (*QueryPaymentsRequest) XXX_Size

func (m *QueryPaymentsRequest) XXX_Size() int

func (*QueryPaymentsRequest) XXX_Unmarshal

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

type QueryPaymentsResponse

type QueryPaymentsResponse struct {
	Payments   FractionalPayments  `protobuf:"bytes,1,rep,name=payments,proto3,castrepeated=FractionalPayments" json:"payments"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProvidersResponse is response type for the Query/Providers RPC method

func (*QueryPaymentsResponse) Descriptor

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

func (*QueryPaymentsResponse) GetPagination

func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse

func (*QueryPaymentsResponse) GetPayments

func (m *QueryPaymentsResponse) GetPayments() FractionalPayments

func (*QueryPaymentsResponse) Marshal

func (m *QueryPaymentsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPaymentsResponse) MarshalTo

func (m *QueryPaymentsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPaymentsResponse) MarshalToSizedBuffer

func (m *QueryPaymentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPaymentsResponse) ProtoMessage

func (*QueryPaymentsResponse) ProtoMessage()

func (*QueryPaymentsResponse) Reset

func (m *QueryPaymentsResponse) Reset()

func (*QueryPaymentsResponse) Size

func (m *QueryPaymentsResponse) Size() (n int)

func (*QueryPaymentsResponse) String

func (m *QueryPaymentsResponse) String() string

func (*QueryPaymentsResponse) Unmarshal

func (m *QueryPaymentsResponse) Unmarshal(dAtA []byte) error

func (*QueryPaymentsResponse) XXX_DiscardUnknown

func (m *QueryPaymentsResponse) XXX_DiscardUnknown()

func (*QueryPaymentsResponse) XXX_Marshal

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

func (*QueryPaymentsResponse) XXX_Merge

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

func (*QueryPaymentsResponse) XXX_Size

func (m *QueryPaymentsResponse) XXX_Size() int

func (*QueryPaymentsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Accounts queries all accounts
	Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Payments queries all payments
	Payments(context.Context, *QueryPaymentsRequest) (*QueryPaymentsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Accounts

func (*UnimplementedQueryServer) Payments

Jump to

Keyboard shortcuts

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