Documentation ¶
Index ¶
- Constants
- func ConvertToHumanReadableDateType(timestamp metav1.Time) string
- func DefaultDetailsColumns() []v1alpha1.ResourceColumnDefinition
- func DefaultListColumns() []v1alpha1.ResourceColumnDefinition
- func FilterColumnsWithDefaults(kc client.Client, gvr schema.GroupVersionResource, ...) []v1alpha1.ResourceColumnDefinition
- func TableForAnyList(kc client.Client, items []unstructured.Unstructured, tableDefName string, ...) (*rsapi.Table, error)
- func TableForList(kc client.Client, gvr schema.GroupVersionResource, ...) (*rsapi.Table, error)
- func TableForObject(kc client.Client, obj runtime.Object, tableDefName string, ...) (*rsapi.Table, error)
- func TxtFuncMap() template.FuncMap
- type DashboardRendererFunc
- type ObjectNamespace
- type ResourceExecFunc
- type TableConvertor
- func New(fieldPath string, columns []v1alpha1.ResourceColumnDefinition, ...) (TableConvertor, error)
- func NewForGVR(kc client.Client, gvr schema.GroupVersionResource, priority rsapi.Priority, ...) (TableConvertor, error)
- func NewForList(fieldPath string, columns []v1alpha1.ResourceColumnDefinition, ...) (TableConvertor, error)
Constants ¶
View Source
const (
ValueNone = "<none>"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertToHumanReadableDateType ¶ added in v0.10.0
ConvertToHumanReadableDateType returns the elapsed time since timestamp in human-readable approximation. ref: https://github.com/kubernetes/apimachinery/blob/v0.21.1/pkg/api/meta/table/table.go#L63-L70 But works for timestamp before or after now.
func DefaultDetailsColumns ¶ added in v0.9.0
func DefaultDetailsColumns() []v1alpha1.ResourceColumnDefinition
func DefaultListColumns ¶ added in v0.9.0
func DefaultListColumns() []v1alpha1.ResourceColumnDefinition
func FilterColumnsWithDefaults ¶ added in v0.9.0
func FilterColumnsWithDefaults( kc client.Client, gvr schema.GroupVersionResource, columns []v1alpha1.ResourceColumnDefinition, priority v1alpha1.Priority, ) []v1alpha1.ResourceColumnDefinition
func TableForAnyList ¶ added in v0.10.2
func TableForAnyList( kc client.Client, items []unstructured.Unstructured, tableDefName string, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc, ) (*rsapi.Table, error)
func TableForList ¶
func TableForList( kc client.Client, gvr schema.GroupVersionResource, items []unstructured.Unstructured, tableDefName string, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc, ) (*rsapi.Table, error)
func TableForObject ¶
func TableForObject( kc client.Client, obj runtime.Object, tableDefName string, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc, ) (*rsapi.Table, error)
func TxtFuncMap ¶ added in v0.5.5
TxtFuncMap returns a 'text/template'.FuncMap
Types ¶
type DashboardRendererFunc ¶ added in v0.10.7
type DashboardRendererFunc func(name string) (*uiapi.ResourceDashboard, string, error)
type ObjectNamespace ¶ added in v0.8.0
type ObjectNamespace struct {
Namespace string `json:"namespace,omitempty"`
}
type ResourceExecFunc ¶ added in v0.12.4
type ResourceExecFunc func() []rsapi.ResourceExec
type TableConvertor ¶
type TableConvertor interface {
ConvertToTable(ctx context.Context, object runtime.Object) (*v1alpha1.Table, error)
}
func New ¶
func New(fieldPath string, columns []v1alpha1.ResourceColumnDefinition, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc) (TableConvertor, error)
New creates a new table convertor for the provided CRD column definition. If the printer definition cannot be parsed, error will be returned along with a default table convertor.
func NewForGVR ¶
func NewForGVR( kc client.Client, gvr schema.GroupVersionResource, priority rsapi.Priority, tableDefName string, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc, ) (TableConvertor, error)
func NewForList ¶ added in v0.9.0
func NewForList(fieldPath string, columns []v1alpha1.ResourceColumnDefinition, fnDashboard DashboardRendererFunc, fnExec ResourceExecFunc) (TableConvertor, error)
Click to show internal directories.
Click to hide internal directories.