accounting

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceRequestToGRPCMessage

func BalanceRequestToGRPCMessage(b *BalanceRequest) *accounting.BalanceRequest

func BalanceResponseToGRPCMessage

func BalanceResponseToGRPCMessage(br *BalanceResponse) *accounting.BalanceResponse

func DecimalToGRPCMessage

func DecimalToGRPCMessage(d *Decimal) *accounting.Decimal

Types

type BalanceRequest

type BalanceRequest struct {
	// contains filtered or unexported fields
}

func BalanceRequestFromGRPCMessage

func BalanceRequestFromGRPCMessage(m *accounting.BalanceRequest) *BalanceRequest

func (*BalanceRequest) GetBody

func (b *BalanceRequest) GetBody() *BalanceRequestBody

func (*BalanceRequest) GetMetaHeader

func (b *BalanceRequest) GetMetaHeader() *session.RequestMetaHeader

func (*BalanceRequest) GetVerificationHeader

func (b *BalanceRequest) GetVerificationHeader() *session.RequestVerificationHeader

func (*BalanceRequest) SetBody

func (b *BalanceRequest) SetBody(v *BalanceRequestBody)

func (*BalanceRequest) SetMetaHeader

func (b *BalanceRequest) SetMetaHeader(v *session.RequestMetaHeader)

func (*BalanceRequest) SetVerificationHeader

func (b *BalanceRequest) SetVerificationHeader(v *session.RequestVerificationHeader)

type BalanceRequestBody

type BalanceRequestBody struct {
	// contains filtered or unexported fields
}

func BalanceRequestBodyFromGRPCMessage

func BalanceRequestBodyFromGRPCMessage(m *accounting.BalanceRequest_Body) *BalanceRequestBody

func (*BalanceRequestBody) GetOwnerID

func (b *BalanceRequestBody) GetOwnerID() *refs.OwnerID

func (*BalanceRequestBody) SetOwnerID

func (b *BalanceRequestBody) SetOwnerID(v *refs.OwnerID)

func (*BalanceRequestBody) StableMarshal

func (b *BalanceRequestBody) StableMarshal(buf []byte) ([]byte, error)

func (*BalanceRequestBody) StableSize

func (b *BalanceRequestBody) StableSize() (size int)

type BalanceResponse

type BalanceResponse struct {
	// contains filtered or unexported fields
}

func BalanceResponseFromGRPCMessage

func BalanceResponseFromGRPCMessage(m *accounting.BalanceResponse) *BalanceResponse

func (*BalanceResponse) GetBody

func (br *BalanceResponse) GetBody() *BalanceResponseBody

func (*BalanceResponse) GetMetaHeader

func (br *BalanceResponse) GetMetaHeader() *session.ResponseMetaHeader

func (*BalanceResponse) GetVerificationHeader

func (br *BalanceResponse) GetVerificationHeader() *session.ResponseVerificationHeader

func (*BalanceResponse) SetBody

func (br *BalanceResponse) SetBody(v *BalanceResponseBody)

func (*BalanceResponse) SetMetaHeader

func (br *BalanceResponse) SetMetaHeader(v *session.ResponseMetaHeader)

func (*BalanceResponse) SetVerificationHeader

func (br *BalanceResponse) SetVerificationHeader(v *session.ResponseVerificationHeader)

type BalanceResponseBody

type BalanceResponseBody struct {
	// contains filtered or unexported fields
}

func (*BalanceResponseBody) GetBalance

func (br *BalanceResponseBody) GetBalance() *Decimal

func (*BalanceResponseBody) SetBalance

func (br *BalanceResponseBody) SetBalance(v *Decimal)

func (*BalanceResponseBody) StableMarshal

func (br *BalanceResponseBody) StableMarshal(buf []byte) ([]byte, error)

func (*BalanceResponseBody) StableSize

func (br *BalanceResponseBody) StableSize() (size int)

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents universal accounting transport client.

func NewClient

func NewClient(opts ...Option) (*Client, error)

func (*Client) Balance

func (c *Client) Balance(ctx context.Context, req *BalanceRequest) (*BalanceResponse, error)

Balance sends BalanceRequest over the network and returns BalanceResponse.

It returns any error encountered during the call.

type Decimal

type Decimal struct {
	// contains filtered or unexported fields
}

func DecimalFromGRPCMessage

func DecimalFromGRPCMessage(m *accounting.Decimal) *Decimal

func (*Decimal) GetPrecision

func (d *Decimal) GetPrecision() uint32

func (*Decimal) GetValue

func (d *Decimal) GetValue() int64

func (*Decimal) MarshalJSON

func (d *Decimal) MarshalJSON() ([]byte, error)

func (*Decimal) SetPrecision

func (d *Decimal) SetPrecision(v uint32)

func (*Decimal) SetValue

func (d *Decimal) SetValue(v int64)

func (*Decimal) StableMarshal

func (d *Decimal) StableMarshal(buf []byte) ([]byte, error)

func (*Decimal) StableSize

func (d *Decimal) StableSize() (size int)

func (*Decimal) Unmarshal

func (d *Decimal) Unmarshal(data []byte) error

func (*Decimal) UnmarshalJSON

func (d *Decimal) UnmarshalJSON(data []byte) error

type Option

type Option func(*cfg)

Option represents Client option.

func WithGRPCCallOpts

func WithGRPCCallOpts(v []grpc.CallOption) Option

func WithGRPCClient

func WithGRPCClient(v *accounting.Client) Option

func WithGRPCClientOpts

func WithGRPCClientOpts(v []accounting.Option) Option

func WithGlobalOpts

func WithGlobalOpts(v ...client.Option) Option

type Service

type Service interface {
	Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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