utils

package
v0.0.0-...-8551cdf Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostProcessResponse

func PostProcessResponse(w http.ResponseWriter, cliCtx context.CLIContext, resp interface{})

PostProcessResponse performs post processing for a REST response. The result returned to clients will contain two fields, the height at which the resource was queried at and the original result.

func PostProcessResponseBare

func PostProcessResponseBare(w http.ResponseWriter, cliCtx context.CLIContext, body interface{})

PostProcessResponseBare post processes a body similar to PostProcessResponse except it does not wrap the body and inject the height.

func PrintOutput

func PrintOutput(ctx context.CLIContext, toPrint interface{}) error

PrintOutput prints output while respecting output and indent flags

func ToPrintObj

func ToPrintObj(ctx context.CLIContext, toPrint interface{}) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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