mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-13 12:33:04 +02:00
The Marshaler interface is used to transform internal types to decorated RPC ones. It decouples that functionality form the rpcServer so it is easier to test exhaustively.
16 lines
482 B
Go
16 lines
482 B
Go
package pool
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/lightninglabs/pool/account"
|
|
"github.com/lightninglabs/pool/poolrpc"
|
|
)
|
|
|
|
// Marshaler interface to transform internal types to decorated RPC ones.
|
|
type Marshaler interface {
|
|
// MarshallAccountsWithAvailableBalance returns the RPC representation
|
|
// of an account with the account.AvailableBalance value populated.
|
|
MarshallAccountsWithAvailableBalance(ctx context.Context,
|
|
accounts []*account.Account) ([]*poolrpc.Account, error)
|
|
}
|