accounting

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrEmptyAddress is raised when passed Address is empty.
	ErrEmptyAddress = internal.Error("empty address")

	// ErrEmptyLockTarget is raised when passed LockTarget is empty.
	ErrEmptyLockTarget = internal.Error("empty lock target")

	// ErrEmptyContainerID is raised when passed CID is empty.
	ErrEmptyContainerID = internal.Error("empty container ID")

	// ErrEmptyParentAddress is raised when passed ParentAddress is empty.
	ErrEmptyParentAddress = internal.Error("empty parent address")
)
View Source
const (
	// ErrWrongSignature is raised when wrong signature is passed.
	ErrWrongSignature = internal.Error("wrong signature")

	// ErrWrongPublicKey is raised when wrong public key is passed.
	ErrWrongPublicKey = internal.Error("wrong public key")

	// ErrWrongChequeData is raised when passed bytes cannot not be parsed as valid Cheque.
	ErrWrongChequeData = internal.Error("wrong cheque data")

	// ErrInvalidLength is raised when passed bytes cannot not be parsed as valid ChequeID.
	ErrInvalidLength = internal.Error("invalid length")
)

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthWithdraw        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWithdraw          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupWithdraw = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Lifetime_Unit_name = map[int32]string{
	0: "Unlimited",
	1: "NeoFSEpoch",
	2: "NeoBlock",
}
View Source
var Lifetime_Unit_value = map[string]int32{
	"Unlimited":  0,
	"NeoFSEpoch": 1,
	"NeoBlock":   2,
}
View Source
var Tx_Type_name = map[int32]string{
	0: "Unknown",
	1: "Withdraw",
	2: "PayIO",
	3: "Inner",
}
View Source
var Tx_Type_value = map[string]int32{
	"Unknown":  0,
	"Withdraw": 1,
	"PayIO":    2,
	"Inner":    3,
}

Functions

func ErrNotEnoughFunds

func ErrNotEnoughFunds(addr string, needed, residue *decimal.Decimal) error

ErrNotEnoughFunds generates error using address and amounts.

func RegisterAccountingServer

func RegisterAccountingServer(s *grpc.Server, srv AccountingServer)

func RegisterWithdrawServer

func RegisterWithdrawServer(s *grpc.Server, srv WithdrawServer)

func SumFunds

func SumFunds(accounts []*Account) (res *decimal.Decimal)

SumFunds goes through all accounts and sums up active funds.

Types

type Account

type Account struct {
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,1,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// Address is identifier of accounting record
	Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"`
	// ParentAddress is identifier of parent accounting record
	ParentAddress string `protobuf:"bytes,3,opt,name=ParentAddress,proto3" json:"ParentAddress,omitempty"`
	// ActiveFunds is amount of active (non locked) funds for account
	ActiveFunds *decimal.Decimal `protobuf:"bytes,4,opt,name=ActiveFunds,proto3" json:"ActiveFunds,omitempty"`
	// Lifetime is time until account is valid (used for lock accounts)
	Lifetime Lifetime `protobuf:"bytes,5,opt,name=Lifetime,proto3" json:"Lifetime"`
	// LockTarget is the purpose of lock funds (it might be withdraw or payment for storage)
	LockTarget *LockTarget `protobuf:"bytes,6,opt,name=LockTarget,proto3" json:"LockTarget,omitempty"`
	// LockAccounts contains child accounts with locked funds
	LockAccounts         []*Account `protobuf:"bytes,7,rep,name=LockAccounts,proto3" json:"LockAccounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Account) CanLock

func (m *Account) CanLock(lockAcc *Account) error

CanLock checks possibility to lock funds.

func (*Account) Descriptor

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

func (*Account) GetActiveFunds

func (m *Account) GetActiveFunds() *decimal.Decimal

func (*Account) GetAddress

func (m *Account) GetAddress() string

func (*Account) GetLifetime

func (m *Account) GetLifetime() Lifetime

func (*Account) GetLockAccounts

func (m *Account) GetLockAccounts() []*Account

func (*Account) GetLockTarget

func (m *Account) GetLockTarget() *LockTarget

func (*Account) GetParentAddress

func (m *Account) GetParentAddress() string

func (*Account) LockForContainerCreate

func (m *Account) LockForContainerCreate(cid refs.CID) bool

LockForContainerCreate checks that account contains locked funds for container creation.

func (*Account) LockForWithdraw

func (m *Account) LockForWithdraw(chequeID string) bool

LockForWithdraw checks that account contains locked funds by passed ChequeID.

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) Unmarshal

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

func (*Account) ValidateLock

func (m *Account) ValidateLock() error

ValidateLock checks that account can be locked.

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 AccountingClient

type AccountingClient interface {
	// Balance returns current balance status of the NeoFS user
	Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
}

AccountingClient is the client API for Accounting service.

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

func NewAccountingClient

func NewAccountingClient(cc *grpc.ClientConn) AccountingClient

type AccountingServer

type AccountingServer interface {
	// Balance returns current balance status of the NeoFS user
	Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
}

AccountingServer is the server API for Accounting service.

type BalanceReceiver

type BalanceReceiver interface {
	Balance(accountAddress string) (*Account, error)
}

BalanceReceiver interface that is used to retrieve user balance by address.

type BalanceRequest

type BalanceRequest struct {
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,1,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// RequestMetaHeader contains information about request meta headers (should be embedded into message)
	service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
	// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
	service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"`
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

func (*BalanceRequest) Descriptor

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

func (*BalanceRequest) Marshal

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

func (*BalanceRequest) MarshalTo

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

func (*BalanceRequest) MarshalToSizedBuffer

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

func (*BalanceRequest) ProtoMessage

func (*BalanceRequest) ProtoMessage()

func (*BalanceRequest) Reset

func (m *BalanceRequest) Reset()

func (*BalanceRequest) Size

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

func (*BalanceRequest) String

func (m *BalanceRequest) String() string

func (*BalanceRequest) Unmarshal

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

func (*BalanceRequest) XXX_DiscardUnknown

func (m *BalanceRequest) XXX_DiscardUnknown()

func (*BalanceRequest) XXX_Marshal

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

func (*BalanceRequest) XXX_Merge

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

func (*BalanceRequest) XXX_Size

func (m *BalanceRequest) XXX_Size() int

func (*BalanceRequest) XXX_Unmarshal

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

type BalanceResponse

type BalanceResponse struct {
	// Balance contains current account balance state
	Balance *decimal.Decimal `protobuf:"bytes,1,opt,name=Balance,proto3" json:"Balance,omitempty"`
	// LockAccounts contains information about locked funds. Locked funds appear
	// when user pays for storage or withdraw assets.
	LockAccounts         []*Account `protobuf:"bytes,2,rep,name=LockAccounts,proto3" json:"LockAccounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*BalanceResponse) Descriptor

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

func (*BalanceResponse) GetBalance

func (m *BalanceResponse) GetBalance() *decimal.Decimal

func (*BalanceResponse) GetLockAccounts

func (m *BalanceResponse) GetLockAccounts() []*Account

func (*BalanceResponse) Marshal

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

func (*BalanceResponse) MarshalTo

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

func (*BalanceResponse) MarshalToSizedBuffer

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

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) Reset

func (m *BalanceResponse) Reset()

func (*BalanceResponse) Size

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

func (*BalanceResponse) String

func (m *BalanceResponse) String() string

func (*BalanceResponse) Unmarshal

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

func (*BalanceResponse) XXX_DiscardUnknown

func (m *BalanceResponse) XXX_DiscardUnknown()

func (*BalanceResponse) XXX_Marshal

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

func (*BalanceResponse) XXX_Merge

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

func (*BalanceResponse) XXX_Size

func (m *BalanceResponse) XXX_Size() int

func (*BalanceResponse) XXX_Unmarshal

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

type Balances

type Balances struct {
	// Accounts contains multiple account snapshots
	Accounts             []Account `protobuf:"bytes,1,rep,name=Accounts,proto3" json:"Accounts"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Balances) Descriptor

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

func (*Balances) GetAccounts

func (m *Balances) GetAccounts() []Account

func (*Balances) Marshal

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

func (*Balances) MarshalTo

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

func (*Balances) MarshalToSizedBuffer

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

func (*Balances) ProtoMessage

func (*Balances) ProtoMessage()

func (*Balances) Reset

func (m *Balances) Reset()

func (*Balances) Size

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

func (*Balances) String

func (m *Balances) String() string

func (*Balances) Unmarshal

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

func (*Balances) XXX_DiscardUnknown

func (m *Balances) XXX_DiscardUnknown()

func (*Balances) XXX_Marshal

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

func (*Balances) XXX_Merge

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

func (*Balances) XXX_Size

func (m *Balances) XXX_Size() int

func (*Balances) XXX_Unmarshal

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

type CID

type CID = refs.CID

CID type alias.

type Cheque

type Cheque struct {
	ID         ChequeID
	Owner      refs.OwnerID
	Amount     *decimal.Decimal
	Height     uint64
	Signatures []ChequeSignature
}

Cheque structure that describes a user request for withdrawal of funds.

func (Cheque) MarshalBinary

func (b Cheque) MarshalBinary() ([]byte, error)

MarshalBinary is used to marshal Cheque into bytes.

func (*Cheque) Sign

func (b *Cheque) Sign(key *ecdsa.PrivateKey) error

Sign is used to sign current Cheque and stores result inside b.Signatures.

func (Cheque) Size

func (b Cheque) Size() int

Size returns size of Cheque (count of bytes needs to store it).

func (*Cheque) UnmarshalBinary

func (b *Cheque) UnmarshalBinary(buf []byte) error

UnmarshalBinary tries to parse []byte into valid Cheque.

func (Cheque) Verify

func (b Cheque) Verify() error

Verify validates current Cheque and Signatures that are generated for current Cheque.

type ChequeID

type ChequeID string

ChequeID is identifier of user request for withdrawal of funds.

func NewChequeID

func NewChequeID() (ChequeID, error)

NewChequeID generates valid random ChequeID using crypto/rand.Reader.

func (ChequeID) Bytes

func (b ChequeID) Bytes() []byte

Bytes returns bytes representation of ChequeID.

func (ChequeID) Empty

func (b ChequeID) Empty() bool

Empty returns true, if ChequeID is empty.

func (ChequeID) Equal

func (b ChequeID) Equal(b2 ChequeID) bool

Equal checks that current ChequeID is equal to passed ChequeID.

func (ChequeID) MarshalTo

func (b ChequeID) MarshalTo(data []byte) (int, error)

MarshalTo tries to marshal ChequeID into passed bytes and returns count of copied bytes or error, if bytes len is not enough to contain ChequeID.

func (ChequeID) Size

func (b ChequeID) Size() int

Size returns size (chain.AddressLength).

func (ChequeID) String

func (b ChequeID) String() string

String returns string representation of ChequeID.

func (*ChequeID) Unmarshal

func (b *ChequeID) Unmarshal(data []byte) error

Unmarshal tries to parse []byte into valid ChequeID.

func (ChequeID) Valid

func (b ChequeID) Valid() bool

Valid validates ChequeID.

type ChequeSignature

type ChequeSignature struct {
	Key  *ecdsa.PublicKey
	Hash []byte
}

ChequeSignature contains public key and hash, and is used to verify signatures.

type ContainerCreateTarget

type ContainerCreateTarget struct {
	// CID is container identifier
	CID                  CID      `protobuf:"bytes,1,opt,name=CID,proto3,customtype=CID" json:"CID"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ContainerCreateTarget) Descriptor

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

func (*ContainerCreateTarget) Marshal

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

func (*ContainerCreateTarget) MarshalTo

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

func (*ContainerCreateTarget) MarshalToSizedBuffer

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

func (*ContainerCreateTarget) ProtoMessage

func (*ContainerCreateTarget) ProtoMessage()

func (*ContainerCreateTarget) Reset

func (m *ContainerCreateTarget) Reset()

func (*ContainerCreateTarget) Size

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

func (*ContainerCreateTarget) String

func (m *ContainerCreateTarget) String() string

func (*ContainerCreateTarget) Unmarshal

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

func (*ContainerCreateTarget) XXX_DiscardUnknown

func (m *ContainerCreateTarget) XXX_DiscardUnknown()

func (*ContainerCreateTarget) XXX_Marshal

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

func (*ContainerCreateTarget) XXX_Merge

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

func (*ContainerCreateTarget) XXX_Size

func (m *ContainerCreateTarget) XXX_Size() int

func (*ContainerCreateTarget) XXX_Unmarshal

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

type Decimal

type Decimal = decimal.Decimal

Decimal type alias.

type DeleteRequest

type DeleteRequest struct {
	// ID is cheque identifier
	ID ChequeID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=ChequeID" json:"ID"`
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,2,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// MessageID is a nonce for uniq request (UUIDv4)
	MessageID MessageID `protobuf:"bytes,3,opt,name=MessageID,proto3,customtype=MessageID" json:"MessageID"`
	// RequestMetaHeader contains information about request meta headers (should be embedded into message)
	service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
	// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
	service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"`
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) Marshal

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

func (*DeleteRequest) MarshalTo

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

func (*DeleteRequest) MarshalToSizedBuffer

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

func (*DeleteRequest) PrepareData

func (m *DeleteRequest) PrepareData() ([]byte, error)

PrepareData prepares bytes representation of DeleteRequest to satisfy SignedRequest interface.

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) Size

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

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

func (*DeleteRequest) Unmarshal

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

func (*DeleteRequest) XXX_DiscardUnknown

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal

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

func (*DeleteRequest) XXX_Merge

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

func (*DeleteRequest) XXX_Size

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal

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

type DeleteResponse

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

DeleteResponse is empty

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) Marshal

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

func (*DeleteResponse) MarshalTo

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

func (*DeleteResponse) MarshalToSizedBuffer

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

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) Size

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

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

func (*DeleteResponse) Unmarshal

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

func (*DeleteResponse) XXX_DiscardUnknown

func (m *DeleteResponse) XXX_DiscardUnknown()

func (*DeleteResponse) XXX_Marshal

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

func (*DeleteResponse) XXX_Merge

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

func (*DeleteResponse) XXX_Size

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal

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

type Filter

type Filter func(acc *Account) bool

Filter is used to filter accounts by criteria.

type GetRequest

type GetRequest struct {
	// ID is cheque identifier
	ID ChequeID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=ChequeID" json:"ID"`
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,2,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// RequestMetaHeader contains information about request meta headers (should be embedded into message)
	service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
	// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
	service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"`
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) Marshal

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

func (*GetRequest) MarshalTo

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

func (*GetRequest) MarshalToSizedBuffer

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

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) Size

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

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Unmarshal

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

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type GetResponse

type GetResponse struct {
	// Withdraw is cheque with meta information
	Withdraw             *Item    `protobuf:"bytes,1,opt,name=Withdraw,proto3" json:"Withdraw,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) GetWithdraw

func (m *GetResponse) GetWithdraw() *Item

func (*GetResponse) Marshal

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

func (*GetResponse) MarshalTo

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

func (*GetResponse) MarshalToSizedBuffer

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

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) Size

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

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) Unmarshal

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

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

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

func (*GetResponse) XXX_Merge

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

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

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

type Item

type Item struct {
	// ID is a cheque identifier
	ID ChequeID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=ChequeID" json:"ID"`
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,2,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// Amount of funds
	Amount *decimal.Decimal `protobuf:"bytes,3,opt,name=Amount,proto3" json:"Amount,omitempty"`
	// Height is the neo blockchain height until the cheque is valid
	Height uint64 `protobuf:"varint,4,opt,name=Height,proto3" json:"Height,omitempty"`
	// Payload contains cheque representation in bytes
	Payload              []byte   `protobuf:"bytes,5,opt,name=Payload,proto3" json:"Payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Item) Descriptor

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

func (*Item) GetAmount

func (m *Item) GetAmount() *decimal.Decimal

func (*Item) GetHeight

func (m *Item) GetHeight() uint64

func (*Item) GetPayload

func (m *Item) GetPayload() []byte

func (*Item) Marshal

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

func (*Item) MarshalTo

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

func (*Item) MarshalToSizedBuffer

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

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) Reset

func (m *Item) Reset()

func (*Item) Size

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

func (*Item) String

func (m *Item) String() string

func (*Item) Unmarshal

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

func (*Item) XXX_DiscardUnknown

func (m *Item) XXX_DiscardUnknown()

func (*Item) XXX_Marshal

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

func (*Item) XXX_Merge

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

func (*Item) XXX_Size

func (m *Item) XXX_Size() int

func (*Item) XXX_Unmarshal

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

type Lifetime

type Lifetime struct {
	// Unit describes how lifetime is measured in account
	Unit Lifetime_Unit `protobuf:"varint,1,opt,name=unit,proto3,enum=accounting.Lifetime_Unit" json:"unit,omitempty"`
	// Value describes how long lifetime will be valid
	Value                int64    `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Lifetime) Descriptor

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

func (*Lifetime) GetUnit

func (m *Lifetime) GetUnit() Lifetime_Unit

func (*Lifetime) GetValue

func (m *Lifetime) GetValue() int64

func (*Lifetime) Marshal

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

func (*Lifetime) MarshalTo

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

func (*Lifetime) MarshalToSizedBuffer

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

func (*Lifetime) ProtoMessage

func (*Lifetime) ProtoMessage()

func (*Lifetime) Reset

func (m *Lifetime) Reset()

func (*Lifetime) Size

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

func (*Lifetime) String

func (m *Lifetime) String() string

func (*Lifetime) Unmarshal

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

func (*Lifetime) XXX_DiscardUnknown

func (m *Lifetime) XXX_DiscardUnknown()

func (*Lifetime) XXX_Marshal

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

func (*Lifetime) XXX_Merge

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

func (*Lifetime) XXX_Size

func (m *Lifetime) XXX_Size() int

func (*Lifetime) XXX_Unmarshal

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

type Lifetime_Unit

type Lifetime_Unit int32

Unit can be Unlimited, based on NeoFS epoch or Neo block

const (
	Lifetime_Unlimited  Lifetime_Unit = 0
	Lifetime_NeoFSEpoch Lifetime_Unit = 1
	Lifetime_NeoBlock   Lifetime_Unit = 2
)

func (Lifetime_Unit) EnumDescriptor

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

func (Lifetime_Unit) String

func (x Lifetime_Unit) String() string

type ListRequest

type ListRequest struct {
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,1,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// RequestMetaHeader contains information about request meta headers (should be embedded into message)
	service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
	// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
	service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"`
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

func (*ListRequest) Descriptor

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

func (*ListRequest) Marshal

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

func (*ListRequest) MarshalTo

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

func (*ListRequest) MarshalToSizedBuffer

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

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) Size

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

func (*ListRequest) String

func (m *ListRequest) String() string

func (*ListRequest) Unmarshal

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

func (*ListRequest) XXX_DiscardUnknown

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal

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

func (*ListRequest) XXX_Merge

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

func (*ListRequest) XXX_Size

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal

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

type ListResponse

type ListResponse struct {
	// Items is a set of cheques with meta information
	Items                []*Item  `protobuf:"bytes,1,rep,name=Items,proto3" json:"Items,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListResponse) Descriptor

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

func (*ListResponse) GetItems

func (m *ListResponse) GetItems() []*Item

func (*ListResponse) Marshal

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

func (*ListResponse) MarshalTo

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

func (*ListResponse) MarshalToSizedBuffer

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

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset

func (m *ListResponse) Reset()

func (*ListResponse) Size

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

func (*ListResponse) String

func (m *ListResponse) String() string

func (*ListResponse) Unmarshal

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

func (*ListResponse) XXX_DiscardUnknown

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal

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

func (*ListResponse) XXX_Merge

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

func (*ListResponse) XXX_Size

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal

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

type LockTarget

type LockTarget struct {
	// Types that are valid to be assigned to Target:
	//	*LockTarget_WithdrawTarget
	//	*LockTarget_ContainerCreateTarget
	Target               isLockTarget_Target `protobuf_oneof:"Target"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

LockTarget must be one of two options

func (*LockTarget) Descriptor

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

func (*LockTarget) GetContainerCreateTarget

func (m *LockTarget) GetContainerCreateTarget() *ContainerCreateTarget

func (*LockTarget) GetTarget

func (m *LockTarget) GetTarget() isLockTarget_Target

func (*LockTarget) GetWithdrawTarget

func (m *LockTarget) GetWithdrawTarget() *WithdrawTarget

func (*LockTarget) Marshal

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

func (*LockTarget) MarshalTo

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

func (*LockTarget) MarshalToSizedBuffer

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

func (*LockTarget) ProtoMessage

func (*LockTarget) ProtoMessage()

func (*LockTarget) Reset

func (m *LockTarget) Reset()

func (*LockTarget) Size

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

func (*LockTarget) String

func (m *LockTarget) String() string

func (*LockTarget) Unmarshal

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

func (*LockTarget) XXX_DiscardUnknown

func (m *LockTarget) XXX_DiscardUnknown()

func (*LockTarget) XXX_Marshal

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

func (*LockTarget) XXX_Merge

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

func (*LockTarget) XXX_OneofWrappers

func (*LockTarget) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*LockTarget) XXX_Size

func (m *LockTarget) XXX_Size() int

func (*LockTarget) XXX_Unmarshal

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

type LockTarget_ContainerCreateTarget

type LockTarget_ContainerCreateTarget struct {
	ContainerCreateTarget *ContainerCreateTarget `protobuf:"bytes,2,opt,name=ContainerCreateTarget,proto3,oneof" json:"ContainerCreateTarget,omitempty"`
}

func (*LockTarget_ContainerCreateTarget) MarshalTo

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

func (*LockTarget_ContainerCreateTarget) MarshalToSizedBuffer

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

func (*LockTarget_ContainerCreateTarget) Size

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

type LockTarget_WithdrawTarget

type LockTarget_WithdrawTarget struct {
	WithdrawTarget *WithdrawTarget `protobuf:"bytes,1,opt,name=WithdrawTarget,proto3,oneof" json:"WithdrawTarget,omitempty"`
}

func (*LockTarget_WithdrawTarget) MarshalTo

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

func (*LockTarget_WithdrawTarget) MarshalToSizedBuffer

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

func (*LockTarget_WithdrawTarget) Size

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

type MessageID

type MessageID = refs.MessageID

MessageID type alias.

type OwnerID

type OwnerID = refs.OwnerID

OwnerID type alias.

type PayIO

type PayIO struct {
	// BlockID contains id of the NEO block where withdraw or deposit
	// call was invoked
	BlockID uint64 `protobuf:"varint,1,opt,name=BlockID,proto3" json:"BlockID,omitempty"`
	// Transactions contains all transactions that founded in block
	// and used for PayIO
	Transactions         []Tx     `protobuf:"bytes,2,rep,name=Transactions,proto3" json:"Transactions"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PayIO) Descriptor

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

func (*PayIO) GetBlockID

func (m *PayIO) GetBlockID() uint64

func (*PayIO) GetTransactions

func (m *PayIO) GetTransactions() []Tx

func (*PayIO) Marshal

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

func (*PayIO) MarshalTo

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

func (*PayIO) MarshalToSizedBuffer

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

func (*PayIO) ProtoMessage

func (*PayIO) ProtoMessage()

func (*PayIO) Reset

func (m *PayIO) Reset()

func (*PayIO) Size

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

func (*PayIO) String

func (m *PayIO) String() string

func (*PayIO) Unmarshal

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

func (*PayIO) XXX_DiscardUnknown

func (m *PayIO) XXX_DiscardUnknown()

func (*PayIO) XXX_Marshal

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

func (*PayIO) XXX_Merge

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

func (*PayIO) XXX_Size

func (m *PayIO) XXX_Size() int

func (*PayIO) XXX_Unmarshal

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

type PutRequest

type PutRequest struct {
	// OwnerID is a wallet address
	OwnerID OwnerID `protobuf:"bytes,1,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
	// Amount of funds
	Amount *decimal.Decimal `protobuf:"bytes,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
	// Height is the neo blockchain height until the cheque is valid
	Height uint64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"`
	// MessageID is a nonce for uniq request (UUIDv4)
	MessageID MessageID `protobuf:"bytes,4,opt,name=MessageID,proto3,customtype=MessageID" json:"MessageID"`
	// RequestMetaHeader contains information about request meta headers (should be embedded into message)
	service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
	// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
	service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"`
	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
	XXX_unrecognized                  []byte   `json:"-"`
	XXX_sizecache                     int32    `json:"-"`
}

func (*PutRequest) Descriptor

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

func (*PutRequest) GetAmount

func (m *PutRequest) GetAmount() *decimal.Decimal

func (*PutRequest) GetHeight

func (m *PutRequest) GetHeight() uint64

func (*PutRequest) Marshal

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

func (*PutRequest) MarshalTo

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

func (*PutRequest) MarshalToSizedBuffer

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

func (*PutRequest) PrepareData

func (m *PutRequest) PrepareData() ([]byte, error)

PrepareData prepares bytes representation of PutRequest to satisfy SignedRequest interface.

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset

func (m *PutRequest) Reset()

func (*PutRequest) Size

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

func (*PutRequest) String

func (m *PutRequest) String() string

func (*PutRequest) Unmarshal

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

func (*PutRequest) XXX_DiscardUnknown

func (m *PutRequest) XXX_DiscardUnknown()

func (*PutRequest) XXX_Marshal

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

func (*PutRequest) XXX_Merge

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

func (*PutRequest) XXX_Size

func (m *PutRequest) XXX_Size() int

func (*PutRequest) XXX_Unmarshal

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

type PutResponse

type PutResponse struct {
	// ID is cheque identifier
	ID                   ChequeID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=ChequeID" json:"ID"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutResponse) Descriptor

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

func (*PutResponse) Marshal

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

func (*PutResponse) MarshalTo

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

func (*PutResponse) MarshalToSizedBuffer

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

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) Size

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

func (*PutResponse) String

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal

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

func (*PutResponse) XXX_DiscardUnknown

func (m *PutResponse) XXX_DiscardUnknown()

func (*PutResponse) XXX_Marshal

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

func (*PutResponse) XXX_Merge

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

func (*PutResponse) XXX_Size

func (m *PutResponse) XXX_Size() int

func (*PutResponse) XXX_Unmarshal

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

type SGID

type SGID = refs.SGID

SGID type alias.

type Settlement

type Settlement struct {
	// Epoch contains an epoch when settlement was accepted
	Epoch uint64 `protobuf:"varint,1,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	// Transactions is a set of transactions
	Transactions         []*Settlement_Tx `protobuf:"bytes,2,rep,name=Transactions,proto3" json:"Transactions,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Settlement) Descriptor

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

func (*Settlement) Equal

func (m *Settlement) Equal(s *Settlement) bool

Equal checks that current Settlement is equal to passed Settlement.

func (*Settlement) GetEpoch

func (m *Settlement) GetEpoch() uint64

func (*Settlement) GetTransactions

func (m *Settlement) GetTransactions() []*Settlement_Tx

func (*Settlement) Marshal

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

func (*Settlement) MarshalTo

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

func (*Settlement) MarshalToSizedBuffer

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

func (*Settlement) ProtoMessage

func (*Settlement) ProtoMessage()

func (*Settlement) Reset

func (m *Settlement) Reset()

func (*Settlement) Size

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

func (*Settlement) String

func (m *Settlement) String() string

func (*Settlement) Unmarshal

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

func (*Settlement) XXX_DiscardUnknown

func (m *Settlement) XXX_DiscardUnknown()

func (*Settlement) XXX_Marshal

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

func (*Settlement) XXX_Merge

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

func (*Settlement) XXX_Size

func (m *Settlement) XXX_Size() int

func (*Settlement) XXX_Unmarshal

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

type Settlement_Container

type Settlement_Container struct {
	// CID is container identifier
	CID CID `protobuf:"bytes,1,opt,name=CID,proto3,customtype=CID" json:"CID"`
	// SGIDs is a set of storage groups that successfully passed the audit
	SGIDs                []SGID   `protobuf:"bytes,2,rep,name=SGIDs,proto3,customtype=SGID" json:"SGIDs"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Settlement_Container) Descriptor

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

func (*Settlement_Container) Marshal

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

func (*Settlement_Container) MarshalTo

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

func (*Settlement_Container) MarshalToSizedBuffer

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

func (*Settlement_Container) ProtoMessage

func (*Settlement_Container) ProtoMessage()

func (*Settlement_Container) Reset

func (m *Settlement_Container) Reset()

func (*Settlement_Container) Size

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

func (*Settlement_Container) String

func (m *Settlement_Container) String() string

func (*Settlement_Container) Unmarshal

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

func (*Settlement_Container) XXX_DiscardUnknown

func (m *Settlement_Container) XXX_DiscardUnknown()

func (*Settlement_Container) XXX_Marshal

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

func (*Settlement_Container) XXX_Merge

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

func (*Settlement_Container) XXX_Size

func (m *Settlement_Container) XXX_Size() int

func (*Settlement_Container) XXX_Unmarshal

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

type Settlement_Receiver

type Settlement_Receiver struct {
	// To is the address of funds recipient
	To string `protobuf:"bytes,1,opt,name=To,proto3" json:"To,omitempty"`
	// Amount is the amount of funds that will be sent
	Amount               *decimal.Decimal `protobuf:"bytes,2,opt,name=Amount,proto3" json:"Amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Settlement_Receiver) Descriptor

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

func (*Settlement_Receiver) GetAmount

func (m *Settlement_Receiver) GetAmount() *decimal.Decimal

func (*Settlement_Receiver) GetTo

func (m *Settlement_Receiver) GetTo() string

func (*Settlement_Receiver) Marshal

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

func (*Settlement_Receiver) MarshalTo

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

func (*Settlement_Receiver) MarshalToSizedBuffer

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

func (*Settlement_Receiver) ProtoMessage

func (*Settlement_Receiver) ProtoMessage()

func (*Settlement_Receiver) Reset

func (m *Settlement_Receiver) Reset()

func (*Settlement_Receiver) Size

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

func (*Settlement_Receiver) String

func (m *Settlement_Receiver) String() string

func (*Settlement_Receiver) Unmarshal

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

func (*Settlement_Receiver) XXX_DiscardUnknown

func (m *Settlement_Receiver) XXX_DiscardUnknown()

func (*Settlement_Receiver) XXX_Marshal

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

func (*Settlement_Receiver) XXX_Merge

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

func (*Settlement_Receiver) XXX_Size

func (m *Settlement_Receiver) XXX_Size() int

func (*Settlement_Receiver) XXX_Unmarshal

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

type Settlement_Tx

type Settlement_Tx struct {
	// From is the address of the sender of funds
	From string `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"`
	// Container that successfully had passed the audit
	Container Settlement_Container `protobuf:"bytes,2,opt,name=Container,proto3" json:"Container"`
	// Receivers is a set of addresses of funds recipients
	Receivers            []Settlement_Receiver `protobuf:"bytes,3,rep,name=Receivers,proto3" json:"Receivers"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*Settlement_Tx) Descriptor

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

func (*Settlement_Tx) GetContainer

func (m *Settlement_Tx) GetContainer() Settlement_Container

func (*Settlement_Tx) GetFrom

func (m *Settlement_Tx) GetFrom() string

func (*Settlement_Tx) GetReceivers

func (m *Settlement_Tx) GetReceivers() []Settlement_Receiver

func (*Settlement_Tx) Marshal

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

func (*Settlement_Tx) MarshalTo

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

func (*Settlement_Tx) MarshalToSizedBuffer

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

func (*Settlement_Tx) ProtoMessage

func (*Settlement_Tx) ProtoMessage()

func (*Settlement_Tx) Reset

func (m *Settlement_Tx) Reset()

func (*Settlement_Tx) Size

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

func (*Settlement_Tx) String

func (m *Settlement_Tx) String() string

func (*Settlement_Tx) Unmarshal

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

func (*Settlement_Tx) XXX_DiscardUnknown

func (m *Settlement_Tx) XXX_DiscardUnknown()

func (*Settlement_Tx) XXX_Marshal

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

func (*Settlement_Tx) XXX_Merge

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

func (*Settlement_Tx) XXX_Size

func (m *Settlement_Tx) XXX_Size() int

func (*Settlement_Tx) XXX_Unmarshal

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

type Tx

type Tx struct {
	// Type describes target of transaction
	Type Tx_Type `protobuf:"varint,1,opt,name=type,proto3,enum=accounting.Tx_Type" json:"type,omitempty"`
	// From describes sender of funds
	From string `protobuf:"bytes,2,opt,name=From,proto3" json:"From,omitempty"`
	// To describes receiver of funds
	To string `protobuf:"bytes,3,opt,name=To,proto3" json:"To,omitempty"`
	// Amount describes amount of funds
	Amount *decimal.Decimal `protobuf:"bytes,4,opt,name=Amount,proto3" json:"Amount,omitempty"`
	// PublicKeys contains public key of sender
	PublicKeys           []byte   `protobuf:"bytes,5,opt,name=PublicKeys,proto3" json:"PublicKeys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Tx) Descriptor

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

func (Tx) Equals

func (m Tx) Equals(tx Tx) bool

Equals checks that m and tx are valid and equal Tx values.

func (*Tx) GetAmount

func (m *Tx) GetAmount() *decimal.Decimal

func (*Tx) GetFrom

func (m *Tx) GetFrom() string

func (*Tx) GetPublicKeys

func (m *Tx) GetPublicKeys() []byte

func (*Tx) GetTo

func (m *Tx) GetTo() string

func (*Tx) GetType

func (m *Tx) GetType() Tx_Type

func (*Tx) Marshal

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

func (*Tx) MarshalTo

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

func (*Tx) MarshalToSizedBuffer

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

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) Reset

func (m *Tx) Reset()

func (*Tx) Size

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

func (*Tx) String

func (m *Tx) String() string

func (*Tx) Unmarshal

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

func (*Tx) XXX_DiscardUnknown

func (m *Tx) XXX_DiscardUnknown()

func (*Tx) XXX_Marshal

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

func (*Tx) XXX_Merge

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

func (*Tx) XXX_Size

func (m *Tx) XXX_Size() int

func (*Tx) XXX_Unmarshal

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

type Tx_Type

type Tx_Type int32

Type can be withdrawal, payIO or inner

const (
	Tx_Unknown  Tx_Type = 0
	Tx_Withdraw Tx_Type = 1
	Tx_PayIO    Tx_Type = 2
	Tx_Inner    Tx_Type = 3
)

func (Tx_Type) EnumDescriptor

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

func (Tx_Type) String

func (x Tx_Type) String() string

type UnimplementedAccountingServer

type UnimplementedAccountingServer struct {
}

UnimplementedAccountingServer can be embedded to have forward compatible implementations.

func (*UnimplementedAccountingServer) Balance

type UnimplementedWithdrawServer

type UnimplementedWithdrawServer struct {
}

UnimplementedWithdrawServer can be embedded to have forward compatible implementations.

func (*UnimplementedWithdrawServer) Delete

func (*UnimplementedWithdrawServer) Get

func (*UnimplementedWithdrawServer) List

func (*UnimplementedWithdrawServer) Put

type WithdrawClient

type WithdrawClient interface {
	// Get returns cheque if it was signed by inner ring nodes
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// Put ask inner ring nodes to sign a cheque for withdraw invoke
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
	// List shows all user's checks
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// Delete allows user to remove unused cheque
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

WithdrawClient is the client API for Withdraw service.

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

func NewWithdrawClient

func NewWithdrawClient(cc *grpc.ClientConn) WithdrawClient

type WithdrawServer

type WithdrawServer interface {
	// Get returns cheque if it was signed by inner ring nodes
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// Put ask inner ring nodes to sign a cheque for withdraw invoke
	Put(context.Context, *PutRequest) (*PutResponse, error)
	// List shows all user's checks
	List(context.Context, *ListRequest) (*ListResponse, error)
	// Delete allows user to remove unused cheque
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
}

WithdrawServer is the server API for Withdraw service.

type WithdrawTarget

type WithdrawTarget struct {
	// Cheque is a string representation of cheque id
	Cheque               string   `protobuf:"bytes,1,opt,name=Cheque,proto3" json:"Cheque,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WithdrawTarget) Descriptor

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

func (*WithdrawTarget) GetCheque

func (m *WithdrawTarget) GetCheque() string

func (*WithdrawTarget) Marshal

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

func (*WithdrawTarget) MarshalTo

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

func (*WithdrawTarget) MarshalToSizedBuffer

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

func (*WithdrawTarget) ProtoMessage

func (*WithdrawTarget) ProtoMessage()

func (*WithdrawTarget) Reset

func (m *WithdrawTarget) Reset()

func (*WithdrawTarget) Size

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

func (*WithdrawTarget) String

func (m *WithdrawTarget) String() string

func (*WithdrawTarget) Unmarshal

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

func (*WithdrawTarget) XXX_DiscardUnknown

func (m *WithdrawTarget) XXX_DiscardUnknown()

func (*WithdrawTarget) XXX_Marshal

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

func (*WithdrawTarget) XXX_Merge

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

func (*WithdrawTarget) XXX_Size

func (m *WithdrawTarget) XXX_Size() int

func (*WithdrawTarget) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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