Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "blocks", Short: "Utilities to read blocks", TraverseChildren: true, }
View Source
var GetCommand = &command.Command{ Cmd: &cobra.Command{ Use: "get <block_id|latest|block_height>", Short: "Get block info", Example: "flow blocks get latest --network testnet", Args: cobra.ExactArgs(1), }, Flags: &blockFlags, Run: func( cmd *cobra.Command, args []string, globalFlags command.GlobalFlags, services *services.Services, ) (command.Result, error) { if blockFlags.Latest || blockFlags.BlockID != "" || blockFlags.BlockHeight != 0 { return nil, fmt.Errorf("⚠️ No longer supported: use command argument.") } block, events, collections, err := services.Blocks.GetBlock( args[0], blockFlags.Events, blockFlags.Verbose, ) if err != nil { return nil, err } return &BlockResult{ block: block, events: events, verbose: blockFlags.Verbose, collections: collections, }, nil }, }
Functions ¶
This section is empty.
Types ¶
type BlockResult ¶
type BlockResult struct {
// contains filtered or unexported fields
}
BlockResult
func (*BlockResult) Oneliner ¶
func (r *BlockResult) Oneliner() string
Oneliner show result as one liner grep friendly
Click to show internal directories.
Click to hide internal directories.