layouts

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package layouts defines the available table layouts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorsFromColoredColumns added in v0.0.24

func ColorsFromColoredColumns(r []ColoredColumn) []tablewriter.Colors

ColorsFromColoredColumns returns the colors of the colored columns

func RowsFromColoredColumns added in v0.0.24

func RowsFromColoredColumns(c []ColoredColumn) []string

RowsFromColoredColumns returns the rows of the colored columns

Types

type Color added in v0.0.24

type Color string

Color is the type for table colors

const (
	// ColorRed is the color red
	ColorRed Color = "red"
	// ColorGreen is the color green
	ColorGreen Color = "green"
	// ColorYellow is the color yellow
	ColorYellow Color = "yellow"
)

type ColoredColumn added in v0.0.24

type ColoredColumn struct {
	Column string
	Color  Color
}

ColoredColumn is a column with a color

func GreenColumn added in v0.0.24

func GreenColumn(column string) ColoredColumn

GreenColumn returns a green colored column

func NoColor added in v0.0.24

func NoColor(column string) ColoredColumn

NoColor returns a column with no color

func RedColumn added in v0.0.24

func RedColumn(column string) ColoredColumn

RedColumn returns a red colored column

func YellowColumn added in v0.0.24

func YellowColumn(column string) ColoredColumn

YellowColumn returns a yellow colored column

type TableLayout

type TableLayout string

TableLayout is the type for table layouts

const (
	// KeyValue is the key value table layout
	KeyValue TableLayout = "keyvalue"
	// RuleTypeOne is the rule type table layout
	RuleTypeOne TableLayout = "ruletype"
	// RuleTypeList is the rule type table layout
	RuleTypeList TableLayout = "ruletype_list"
	// ProfileSettings is the profile settings table layout
	ProfileSettings TableLayout = "profile_settings"
	// Profile is the profile table layout
	Profile TableLayout = "profile"
	// ProviderList is the provider list table layout
	ProviderList TableLayout = "provider_list"
	// RepoList is the repo list table layout
	RepoList TableLayout = "repolist"
	// ProfileStatus is the profile status table layout
	ProfileStatus TableLayout = "profile_status"
	// RuleEvaluations is the rule evaluations table layout
	RuleEvaluations TableLayout = "rule_evaluations"
	// RoleList is the roles list table layout
	RoleList TableLayout = "role_list"
	// Default is the default table layout
	Default TableLayout = ""
)

Jump to

Keyboard shortcuts

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