Example #1
0
// getBlockAPI returns a block api for listing blocks.
func getBlockAPI(c *envcmd.EnvCommandBase) (block.BlockListAPI, error) {
	root, err := c.NewAPIRoot()
	if err != nil {
		return nil, err
	}
	return apiblock.NewClient(root), nil
}
Example #2
0
func connectionCredentials(c envcmd.EnvCommandBase) (configstore.APICredentials, error) {
	return c.ConnectionCredentials()
}
Example #3
0
func connectionEndpoint(c envcmd.EnvCommandBase, refresh bool) (configstore.APIEndpoint, error) {
	return c.ConnectionEndpoint(refresh)
}