format

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultFormat specifies default value for Options.Format
	DefaultFormat = formatTable
)

Variables

This section is empty.

Functions

func APIKey

func APIKey(x *iam.APIKey, opts Options) string

APIKey returns a single api key formatted for humans.

func APIKeyList

func APIKeyList(list []*iam.APIKey, opts Options) string

APIKeyList returns a list of api keys formatted for humans.

func APIKeySecret

func APIKeySecret(x *iam.APIKeySecret, opts Options) string

APIKeySecret returns a single api key secret formatted for humans.

func AuditLog added in v0.20.2

func AuditLog(x *audit.AuditLog, opts Options) string

AuditLog returns a single audit log formatted for humans.

func AuditLogArchive added in v0.20.2

func AuditLogArchive(x *audit.AuditLogArchive, opts Options) string

AuditLogArchive returns a formatted auditlog archive.

func AuditLogArchiveList added in v0.20.2

func AuditLogArchiveList(list []*audit.AuditLogArchive, opts Options) string

AuditLogArchiveList returns a formatted list of auditlog archives.

func AuditLogDestinationList added in v0.20.2

func AuditLogDestinationList(list []*audit.AuditLog_Destination, opts Options) string

AuditLogDestinationList returns a list of configured destinations.

func AuditLogEventList added in v0.20.2

func AuditLogEventList(list []*audit.AuditLogEvent, opts Options) string

AuditLogEventList returns a formatted list of auditlog events.

func AuditLogList added in v0.20.2

func AuditLogList(list []*audit.AuditLog, opts Options) string

AuditLog returns a single audit log formatted for humans.

func Backup

func Backup(x *backup.Backup, opts Options) string

Backup returns a single backup formatted for humans.

func BackupList

func BackupList(list []*backup.Backup, opts Options) string

BackupList returns a list of backups for a deployment.

func BackupPolicy added in v0.19.0

func BackupPolicy(x *backup.BackupPolicy, opts Options) string

BackupPolicy returns a single backup policy formatted for humans.

func BackupPolicyList added in v0.19.0

func BackupPolicyList(list []*backup.BackupPolicy, opts Options) string

BackupPolicyList returns a list of backup policies for a deployment.

func CACertificate

func CACertificate(x *crypto.CACertificate, opts Options) string

CACertificate returns a single ca certificate formatted for humans.

func CACertificateList

func CACertificateList(list []*crypto.CACertificate, opts Options) string

CACertificateList returns a list of ca certificates formatted for humans.

func CLIVersion

func CLIVersion(version string, opts Options) string

CLIVersion returns a single version formatted for humans.

func CPUSizeList

func CPUSizeList(list []*data.CPUSize, opts Options) string

CPUSizeList returns a list of CPU sizes.

func Deployment

func Deployment(x *data.Deployment, creds *data.DeploymentCredentials, opts Options, showRootpassword bool) string

Deployment returns a single deployment formatted for humans.

func DeploymentList

func DeploymentList(list []*data.Deployment, opts Options) string

DeploymentList returns a list of deployments formatted for humans.

func DisplaySuccess added in v0.15.0

func DisplaySuccess(opts Options)

DisplaySuccess prints out the message 'Success!' after a command in case the formatter is table.

func Example added in v0.13.0

func Example(x *example.ExampleDataset, opts Options) string

Example returns a single example dataset formatted for humans.

func ExampleDatasetInstallation added in v0.13.0

func ExampleDatasetInstallation(x *example.ExampleDatasetInstallation, opts Options) string

ExampleDatasetInstallation returns a single installation formatted for humans.

func ExampleDatasetInstallationList added in v0.13.0

func ExampleDatasetInstallationList(list []*example.ExampleDatasetInstallation, opts Options) string

ExampleDatasetInstallationList returns a list of installations formatted for humans.

func ExampleList added in v0.13.0

func ExampleList(list []*example.ExampleDataset, opts Options) string

ExampleList returns a list of example datasets.

func Group

func Group(x *iam.Group, opts Options) string

Group returns a single group formatted for humans.

func GroupList

func GroupList(list []*iam.Group, opts Options) string

GroupList returns a list of groups formatted for humans.

func GroupMember

func GroupMember(ctx context.Context, x string, iamc iam.IAMServiceClient, opts Options) string

GroupMember returns a single organization member formatted for humans.

func GroupMemberList

func GroupMemberList(ctx context.Context, list []string, iamc iam.IAMServiceClient, opts Options) string

GroupMemberList returns a list of group members formatted for humans.

func IPAllowlist added in v0.17.0

func IPAllowlist(x *security.IPAllowlist, opts Options) string

IPAllowlist returns a single IP allowlist formatted for humans.

func IPAllowlistList added in v0.17.0

func IPAllowlistList(list []*security.IPAllowlist, opts Options) string

IPAllowlistList returns a list of IP allowlists formatted for humans.

func MetricsToken added in v1.4.0

func MetricsToken(x *metrics.Token, opts Options) string

MetricsToken returns a single metrics token formatted for humans.

func MetricsTokenList added in v1.4.0

func MetricsTokenList(list []*metrics.Token, opts Options) string

MetricsTokenList returns a list of metrics token formatted for humans.

func NodeSizeList

func NodeSizeList(list []*data.NodeSize, cpuList []*data.CPUSize, opts Options) string

NodeSizeList returns a list of node sizes.

func Organization

func Organization(x *rm.Organization, opts Options) string

Organization returns a single organization formatted for humans.

func OrganizationInvite

func OrganizationInvite(ctx context.Context, x *rm.OrganizationInvite, iamc iam.IAMServiceClient, opts Options) string

OrganizationInvite returns a single organization member formatted for humans.

func OrganizationInviteList

func OrganizationInviteList(ctx context.Context, list []*rm.OrganizationInvite, iamc iam.IAMServiceClient, opts Options) string

OrganizationInviteList returns a list of organization members formatted for humans.

func OrganizationList

func OrganizationList(list []*rm.Organization, opts Options) string

OrganizationList returns a list of organizations formatted for humans.

func OrganizationMember

func OrganizationMember(ctx context.Context, x *rm.Member, iamc iam.IAMServiceClient, opts Options) string

OrganizationMember returns a single organization member formatted for humans.

func OrganizationMemberList

func OrganizationMemberList(ctx context.Context, list []*rm.Member, iamc iam.IAMServiceClient, opts Options) string

OrganizationMemberList returns a list of organization members formatted for humans.

func PermissionList

func PermissionList(list []string, opts Options) string

PermissionList returns a list of permissions formatted for humans.

func Policy

func Policy(ctx context.Context, x *iam.Policy, iamc iam.IAMServiceClient, opts Options) string

Policy returns a single policy formatted for humans.

func Project

func Project(x *rm.Project, opts Options) string

Project returns a single project formatted for humans.

func ProjectList

func ProjectList(list []*rm.Project, opts Options) string

ProjectList returns a list of projects formatted for humans.

func Provider

func Provider(x *platform.Provider, opts Options) string

Provider returns a single provider formatted for humans.

func ProviderList

func ProviderList(list []*platform.Provider, opts Options) string

ProviderList returns a list of providers formatted for humans.

func Region

func Region(x *platform.Region, opts Options) string

Region returns a single region formatted for humans.

func RegionList

func RegionList(list []*platform.Region, opts Options) string

RegionList returns a list of regions formatted for humans.

func Role

func Role(x *iam.Role, opts Options) string

Role returns a single role formatted for humans.

func RoleList

func RoleList(list []*iam.Role, opts Options) string

RoleList returns a list of roles formatted for humans.

func ServerStatusList added in v0.15.0

func ServerStatusList(list []*data.Deployment_ServerStatus, opts Options) string

ServerStatusList returns a list of deployment servers formatted for humans.

func ServerStatusListAsRows added in v0.19.0

func ServerStatusListAsRows(list []*data.Deployment_ServerStatus, opts Options) []string

ServerStatusListAsRows returns a list of deployment servers formatted for a table.

func ServersSpecLimits

func ServersSpecLimits(x *data.ServersSpecLimits, opts Options) string

ServersSpecLimits returns a single server specification limts formatted for humans.

func TermsAndConditions added in v0.17.0

func TermsAndConditions(x *rm.TermsAndConditions, opts Options) string

TermsAndConditions returns a single terms and conditions formatted for humans.

func ToolsVersion added in v0.20.0

func ToolsVersion(x *tools.ToolsVersion, opts Options) string

ToolsVersion returns a single tools version formatted for humans.

func User

func User(x *iam.User, opts Options) string

User returns a single user formatted for humans.

func UserList

func UserList(list []*iam.User, opts Options) string

UserList returns a list of users formatted for humans.

func Version

func Version(x *data.Version, opts Options) string

Version returns a single version formatted for humans.

func VersionList

func VersionList(list []*data.Version, defaultVersion *data.Version, opts Options) string

VersionList returns a list of versions formatted for humans.

Types

type Options

type Options struct {
	Format string
}

Options that control the formatter.

Jump to

Keyboard shortcuts

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