Documentation ¶
Index ¶
- Constants
- func NewDetailsTable(w io.Writer) *tablewriter.Table
- func WriteAssociatedBindings(w io.Writer, bindings []v1beta1.ServiceBinding)
- func WriteAssociatedInstances(w io.Writer, instances []v1beta1.ServiceInstance)
- func WriteAssociatedPlans(w io.Writer, plans []servicecatalog.Plan)
- func WriteAssociatedSecret(w io.Writer, secret *v1.Secret, err error, showSecrets bool)
- func WriteBinding(w io.Writer, outputFormat string, binding v1beta1.ServiceBinding)
- func WriteBindingDetails(w io.Writer, binding *v1beta1.ServiceBinding)
- func WriteBindingList(w io.Writer, outputFormat string, bindingList *v1beta1.ServiceBindingList)
- func WriteBroker(w io.Writer, outputFormat string, broker v1beta1.ClusterServiceBroker)
- func WriteBrokerDetails(w io.Writer, broker servicecatalog.Broker)
- func WriteBrokerList(w io.Writer, outputFormat string, brokers ...servicecatalog.Broker)
- func WriteClass(w io.Writer, outputFormat string, class v1beta1.ClusterServiceClass)
- func WriteClassDetails(w io.Writer, class *v1beta1.ClusterServiceClass)
- func WriteClassList(w io.Writer, outputFormat string, classes ...servicecatalog.Class)
- func WriteClientVersion(w io.Writer, client string)
- func WriteDeletedBindingNames(w io.Writer, bindings []v1beta1.ServiceBinding)
- func WriteDeletedResourceName(w io.Writer, resourceName string)
- func WriteInstance(w io.Writer, outputFormat string, instance v1beta1.ServiceInstance)
- func WriteInstanceDetails(w io.Writer, instance *v1beta1.ServiceInstance)
- func WriteInstanceList(w io.Writer, outputFormat string, instanceList *v1beta1.ServiceInstanceList)
- func WriteParentInstance(w io.Writer, instance *v1beta1.ServiceInstance)
- func WriteParentPlan(w io.Writer, plan *v1beta1.ClusterServicePlan)
- func WritePlan(w io.Writer, outputFormat string, plan v1beta1.ClusterServicePlan, ...)
- func WritePlanDetails(w io.Writer, plan *v1beta1.ClusterServicePlan, ...)
- func WritePlanList(w io.Writer, outputFormat string, plans []servicecatalog.Plan, ...)
- func WritePlanSchemas(w io.Writer, plan *v1beta1.ClusterServicePlan)
- func WriteServerVersion(w io.Writer, server string)
- type ListTable
Constants ¶
const ( // FormatJSON is the --output flag value for json output. FormatJSON = "json" // FormatTable is the --output flag value for tablular output. FormatTable = "table" // FormatYAML is the --output flag value for yaml output. FormatYAML = "yaml" )
const DefaultPageWidth = 80
DefaultPageWidth is the page (screen) width to use when we need to twiddle the width of some table columns for better viewing. For now assume it's only 80, but if we can figure out a nice (quick) way to determine this for all platforms, include Windows, then we should probably use that value instead.
Variables ¶
This section is empty.
Functions ¶
func NewDetailsTable ¶
func NewDetailsTable(w io.Writer) *tablewriter.Table
NewDetailsTable builds a table formatted to list details for a single result.
func WriteAssociatedBindings ¶
func WriteAssociatedBindings(w io.Writer, bindings []v1beta1.ServiceBinding)
WriteAssociatedBindings prints a list of bindings associated with an instance.
func WriteAssociatedInstances ¶
func WriteAssociatedInstances(w io.Writer, instances []v1beta1.ServiceInstance)
WriteAssociatedInstances prints a list of instances associated with a plan.
func WriteAssociatedPlans ¶
WriteAssociatedPlans prints a list of plans associated with a class.
func WriteAssociatedSecret ¶
WriteAssociatedSecret prints the secret data associated with a binding.
func WriteBinding ¶
func WriteBinding(w io.Writer, outputFormat string, binding v1beta1.ServiceBinding)
WriteBinding prints a single bindings in the specified output format.
func WriteBindingDetails ¶
func WriteBindingDetails(w io.Writer, binding *v1beta1.ServiceBinding)
WriteBindingDetails prints details for a single binding.
func WriteBindingList ¶
func WriteBindingList(w io.Writer, outputFormat string, bindingList *v1beta1.ServiceBindingList)
WriteBindingList prints a list of bindings in the specified output format.
func WriteBroker ¶
func WriteBroker(w io.Writer, outputFormat string, broker v1beta1.ClusterServiceBroker)
WriteBroker prints a broker in the specified output format.
func WriteBrokerDetails ¶
WriteBrokerDetails prints details for a single broker.
func WriteBrokerList ¶
WriteBrokerList prints a list of brokers in the specified output format.
func WriteClass ¶
func WriteClass(w io.Writer, outputFormat string, class v1beta1.ClusterServiceClass)
WriteClass prints a single class in the specified output format.
func WriteClassDetails ¶
func WriteClassDetails(w io.Writer, class *v1beta1.ClusterServiceClass)
WriteClassDetails prints details for a single class.
func WriteClassList ¶
WriteClassList prints a list of classes in the specified output format.
func WriteClientVersion ¶
WriteClientVersion prints client version
func WriteDeletedBindingNames ¶
func WriteDeletedBindingNames(w io.Writer, bindings []v1beta1.ServiceBinding)
WriteDeletedBindingNames prints the names of a list of bindings
func WriteDeletedResourceName ¶
WriteDeletedResourceName prints the name of a deleted resource
func WriteInstance ¶
func WriteInstance(w io.Writer, outputFormat string, instance v1beta1.ServiceInstance)
WriteInstance prints a single instance
func WriteInstanceDetails ¶
func WriteInstanceDetails(w io.Writer, instance *v1beta1.ServiceInstance)
WriteInstanceDetails prints an instance.
func WriteInstanceList ¶
func WriteInstanceList(w io.Writer, outputFormat string, instanceList *v1beta1.ServiceInstanceList)
WriteInstanceList prints a list of instances.
func WriteParentInstance ¶
func WriteParentInstance(w io.Writer, instance *v1beta1.ServiceInstance)
WriteParentInstance prints identifying information for a parent instance.
func WriteParentPlan ¶
func WriteParentPlan(w io.Writer, plan *v1beta1.ClusterServicePlan)
WriteParentPlan prints identifying information for a parent class.
func WritePlan ¶
func WritePlan(w io.Writer, outputFormat string, plan v1beta1.ClusterServicePlan, class v1beta1.ClusterServiceClass)
WritePlan prints a single plan in the specified output format.
func WritePlanDetails ¶
func WritePlanDetails(w io.Writer, plan *v1beta1.ClusterServicePlan, class *v1beta1.ClusterServiceClass)
WritePlanDetails prints details for a single plan.
func WritePlanList ¶
func WritePlanList(w io.Writer, outputFormat string, plans []servicecatalog.Plan, classes []servicecatalog.Class)
WritePlanList prints a list of plans in the specified output format.
func WritePlanSchemas ¶
func WritePlanSchemas(w io.Writer, plan *v1beta1.ClusterServicePlan)
WritePlanSchemas prints the schemas for a single plan.
func WriteServerVersion ¶
WriteServerVersion prints server version
Types ¶
type ListTable ¶
type ListTable struct {
// contains filtered or unexported fields
}
ListTable is a proxy for 'tablewriter.Table' so we can support a variable width column that tries to fill up extra space on the line when needed. For each func on tablewriter.Table we use we'll need a proxy func. We save the headers and rows and only send them on when Render() is called because the tablewriter stuff won't respect the call to SetColMinWidth if it's called after some rows have been added. So we need to calc the value of our special column first, call SetColMinWidth and then add the headers/rows.
func NewListTable ¶
NewListTable builds a table formatted to list a set of results.
func (*ListTable) Append ¶
Append will look at each column in the row to see if it's longer than any previous value, and save it if so. Then it saves the data for later rendering.
func (*ListTable) Render ¶
func (lt *ListTable) Render()
Render will calc the width of the variable column if asked to. Then pass our headers and rows to the real Render func to display it.
func (*ListTable) SetColMinWidth ¶
SetColMinWidth is a proxy/pass-thru to the tablewriter.Table's func
func (*ListTable) SetPageWidth ¶
SetPageWidth allows us to change the screen/page width. Probably not used right now, so it's just for future need.
func (*ListTable) SetVariableColumn ¶
SetVariableColumn tells us which column, if any, should be of variable width so that the table takes up the width of the screen rather than wrapping cells in this column prematurely.