commands

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

func NewApp

func NewApp(actionOpts ...ActionOption) cli.App

NewApp creates a new tapcli app with all the available commands.

func NewGetInfoCommand

func NewGetInfoCommand(actionOpts ...ActionOption) cli.Command

NewGetInfoCommand creates a new command to get daemon info.

Types

type ActionOption

type ActionOption func(*actionOpts)

ActionOption is a function type that can be used to set options for an action.

func ActionRespChan

func ActionRespChan(respChan chan<- lfn.Result[interface{}]) ActionOption

ActionRespChan is an option modifier function that sets the response channel for an action.

func ActionWithClient

func ActionWithClient(client RpcClientsBundle) ActionOption

ActionWithClient is an option modifier function that sets the client for an action.

func ActionWithCtx

func ActionWithCtx(ctx context.Context) ActionOption

ActionWithCtx is an option modifier function that sets the context for an action.

func ActionWithSilencePrint

func ActionWithSilencePrint(silencePrint bool) ActionOption

ActionWithSilencePrint is an option modifier function that sets the silence print option for an action.

type RpcClientsBundle

RpcClientsBundle is an interface that groups all the RPC clients.

type UnwrappedAction

type UnwrappedAction func(cliCtx *cli.Context, ctx context.Context,
	client taprpc.TaprootAssetsClient, silencePrint bool) (proto.Message,
	error)

UnwrappedAction is a function signatures for unwrapped actions that are executed by the wrapped action.

type WrappedAction

type WrappedAction = func(*cli.Context) error

WrappedAction is a function signature for wrapped actions that are executed by cli.

func NewWrappedAction

func NewWrappedAction(action UnwrappedAction,
	actionOpts ...ActionOption) WrappedAction

NewWrappedAction creates a new WrappedAction that wraps an UnwrappedAction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳