formatter

package
v0.1.19 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TableFormatKey  = "table"
	RawFormatKey    = "raw"
	PrettyFormatKey = "pretty"
	JSONFormatKey   = "json"

	DefaultQuietFormat = "{{.ID}}"

	GREEN_COLOR = "green"
	RED_COLOR   = "red"
)

Format keys used to specify certain kinds of output formats

Variables

This section is empty.

Functions

func AffinitizedRegionToEmoji added in v0.1.16

func AffinitizedRegionToEmoji(isAffinitized bool) string

func ApiKeyWrite added in v0.1.7

func ApiKeyWrite(ctx Context, keys []ybmclient.ApiKeyData) error

ApiKeyWrite renders the context for a list of API Keys

func BackupWrite

func BackupWrite(ctx Context, Backups []ybmclient.BackupData) error

BackupWrite renders the context for a list of backups

func CMKWrite added in v0.1.5

func CMKWrite(ctx Context, cmkData ybmclient.CMKData) error

func CalculateTimeDifference added in v0.1.19

func CalculateTimeDifference(timestamp1, timestamp2 string) (string, error)

func CdcSinkWrite

func CdcSinkWrite(ctx Context, cdcSinks []ybmclient.CdcSinkData) error

CdcSinkWrite renders the context for a list of cdc sinks

func CdcStreamWrite

func CdcStreamWrite(ctx Context, cdcStreams []ybmclient.CdcStreamData) error

CdStreamWrite renders the context for a list of cdc streams

func CloudRegionWrite

func CloudRegionWrite(ctx Context, cloudRegions []ybmclient.RegionListResponseDataItem) error

CloudRegionWrite renders the context for a list of cloud regions

func ClusterWrite

func ClusterWrite(ctx Context, clusters []ybmclient.ClusterData) error

ClusterWrite renders the context for a list of clusters

func Colorize

func Colorize(message string, colors string) string

Colorize the message accoring the colors var

func ConvertBytestoGb added in v0.0.15

func ConvertBytestoGb(sizeInB int64) string

convertMbtoGb convert MB to GB

func DbAuditLogsExporterWrite added in v0.1.19

func DbAuditLogsExporterWrite(ctx Context, dbAuditLogsExporterConfigs []ybmclient.DbAuditExporterConfigurationData) error

DbAuditWrite renders the context for a list of Db Audit Export config

func EndpointWrite added in v0.0.14

func EndpointWrite(ctx Context, endpoints []ybmclient.Endpoint, provider []string) error

func FormatDate

func FormatDate(dateToBeFormatted string) string

TODO add error handling

func FormatDateAndAddDays added in v0.1.19

func FormatDateAndAddDays(dateToBeFormatted string, days int) string

func InstanceTypeWrite

func InstanceTypeWrite(ctx Context, instanceTypes []ybmclient.NodeConfigurationResponseItem) error

InstanceTypeWrite renders the context for a list of instance types

func IntegrationShortenKey added in v0.1.19

func IntegrationShortenKey(key string, stringLen int) string

func IntegrationWrite added in v0.1.19

func IntegrationWrite(ctx Context, Integrations []ybmclient.TelemetryProviderData) error

func MetricsExporterWrite added in v0.1.15

func MetricsExporterWrite(ctx Context, metricsExporters []ybmclient.MetricsExporterConfigurationData) error

func NetworkAllowListWrite

func NetworkAllowListWrite(ctx Context, nals []ybmclient.NetworkAllowListData) error

NetworkAllowListWrite renders the context for a list of network allow lists

func NewClusterInfoRegionsContext added in v0.0.6

func NewClusterInfoRegionsContext() *clusterInfoRegionsContext

func NewDatabasesContext added in v0.1.19

func NewDatabasesContext() *databasesContext

func NewRoleApiKeysContext added in v0.1.7

func NewRoleApiKeysContext() *roleApiKeysContext

func NewRolePermissionContext added in v0.1.7

func NewRolePermissionContext() *rolePermissionContext

func NewRoleUsersContext added in v0.1.7

func NewRoleUsersContext() *roleUsersContext

func NodeHealthToEmoji added in v0.0.15

func NodeHealthToEmoji(status bool) string

func NodeTypeToEmoji added in v0.0.15

func NodeTypeToEmoji(nodeType bool) string

func NodeWrite added in v0.0.15

func NodeWrite(ctx Context, node []ybmclient.NodeData) error

func PSEndpointWrite added in v0.0.15

func PSEndpointWrite(ctx Context, pseData ybmclient.PrivateServiceEndpointRegionData, endpoint ybmclient.Endpoint) error

func ReadReplicaWrite

func ReadReplicaWrite(ctx Context, rrSpecs []ybmclient.ReadReplicaSpec, rrEndpoints []ybmclient.Endpoint) error

ReadReplicaWrite renders the context for a list of read replicas

func ResourcePermissionWrite added in v0.1.7

func ResourcePermissionWrite(ctx Context, resourcePermissions []ybmclient.ResourcePermissionsData) error

ResourcePermissionWrite renders the context for a list of resource permissions

func RoleWrite added in v0.1.7

func RoleWrite(ctx Context, roles []ybmclient.RoleData) error

RoleWrite renders the context for a list of roles

func ShortenKey added in v0.1.17

func ShortenKey(key string, stringLen int) string

func SingleApiKeyWrite added in v0.1.7

func SingleApiKeyWrite(ctx Context, key ybmclient.ApiKeyData) error

func SingleBackupWrite added in v0.1.19

func SingleBackupWrite(ctx Context, backup ybmclient.BackupData) error

SingleBackupWrite renders the context for a single backup

func SingleRoleWrite added in v0.1.7

func SingleRoleWrite(ctx Context, role ybmclient.RoleData) error

SingleRoleWrite renders the context for a single role

func Truncate added in v0.0.14

func Truncate(text string, lenght int) string

func UserWrite added in v0.1.7

func UserWrite(ctx Context, users []ybmclient.UserData) error

UserWrite renders the context for a list of users

func VPCPeeringWrite

func VPCPeeringWrite(ctx Context, VPCPeerings []ybmclient.VpcPeeringData) error

VPCPeeringWrite renders the context for a list of VPC Peerings

func VPCWrite

func VPCWrite(ctx Context, VPCs []ybmclient.SingleTenantVpcDataResponse) error

VPCWrite renders the context for a list of VPCs

Types

type ApiKeyContext added in v0.1.7

type ApiKeyContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewApiKeyContext added in v0.1.7

func NewApiKeyContext() *ApiKeyContext

NewApiKeyContext creates a new context for rendering API Keys

func (*ApiKeyContext) ApiKeyName added in v0.1.7

func (a *ApiKeyContext) ApiKeyName() string

func (*ApiKeyContext) ApiKeyRole added in v0.1.7

func (a *ApiKeyContext) ApiKeyRole() string

func (*ApiKeyContext) ApiKeyStatus added in v0.1.7

func (a *ApiKeyContext) ApiKeyStatus() string

func (*ApiKeyContext) CreatedAt added in v0.1.7

func (a *ApiKeyContext) CreatedAt() string

func (*ApiKeyContext) ExpiryTime added in v0.1.7

func (a *ApiKeyContext) ExpiryTime() string

func (*ApiKeyContext) ID added in v0.1.7

func (a *ApiKeyContext) ID() string

func (*ApiKeyContext) Issuer added in v0.1.7

func (a *ApiKeyContext) Issuer() string

func (*ApiKeyContext) LastUsed added in v0.1.7

func (a *ApiKeyContext) LastUsed() string

func (*ApiKeyContext) MarshalJSON added in v0.1.7

func (a *ApiKeyContext) MarshalJSON() ([]byte, error)

type BackupContext

type BackupContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewBackupContext

func NewBackupContext() *BackupContext

NewBackupContext creates a new context for rendering Backup

func (*BackupContext) BackupState

func (c *BackupContext) BackupState() string

func (*BackupContext) BackupType

func (c *BackupContext) BackupType() string

func (*BackupContext) ClusterName

func (c *BackupContext) ClusterName() string

func (*BackupContext) CreatedOn

func (c *BackupContext) CreatedOn() string

func (*BackupContext) Description

func (c *BackupContext) Description() string

func (*BackupContext) Duration added in v0.1.19

func (c *BackupContext) Duration() string

func (*BackupContext) ExpireOn

func (c *BackupContext) ExpireOn() string

func (*BackupContext) Id

func (c *BackupContext) Id() string

func (*BackupContext) Incremental added in v0.1.19

func (c *BackupContext) Incremental() string

func (*BackupContext) MarshalJSON

func (c *BackupContext) MarshalJSON() ([]byte, error)

func (*BackupContext) RetainInDays

func (c *BackupContext) RetainInDays() string

func (*BackupContext) Size added in v0.1.19

func (c *BackupContext) Size() string

type CMKContext added in v0.1.5

type CMKContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewCMKContext added in v0.1.5

func NewCMKContext() *CMKContext

func (*CMKContext) CMKStatus added in v0.1.14

func (c *CMKContext) CMKStatus() ybmclient.CMKStatusEnum

func (*CMKContext) KeyAlias added in v0.1.5

func (c *CMKContext) KeyAlias() string

func (*CMKContext) LastRotated added in v0.1.17

func (c *CMKContext) LastRotated() string

func (*CMKContext) MarshalJSON added in v0.1.5

func (c *CMKContext) MarshalJSON() ([]byte, error)

func (*CMKContext) Provider added in v0.1.5

func (c *CMKContext) Provider() ybmclient.CMKProviderEnum

func (*CMKContext) ResourceId added in v0.1.7

func (c *CMKContext) ResourceId() string

func (*CMKContext) SecurityPrincipals added in v0.1.5

func (c *CMKContext) SecurityPrincipals() string

type CdcSinkContext

type CdcSinkContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewCdcSinkContext

func NewCdcSinkContext() *CdcSinkContext

NewCdcSinkContext creates a new context for rendering cdc sink

func (*CdcSinkContext) HostName

func (c *CdcSinkContext) HostName() string

func (*CdcSinkContext) MarshalJSON

func (c *CdcSinkContext) MarshalJSON() ([]byte, error)

func (*CdcSinkContext) Name

func (c *CdcSinkContext) Name() string

func (*CdcSinkContext) State

func (c *CdcSinkContext) State() string

func (*CdcSinkContext) Type

func (c *CdcSinkContext) Type() string

type CdcStreamContext

type CdcStreamContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewCdcStreamContext

func NewCdcStreamContext() *CdcStreamContext

NewCdcStreamContext creates a new context for rendering cdc stream

func (*CdcStreamContext) DBName

func (c *CdcStreamContext) DBName() string

func (*CdcStreamContext) KafkaPrefix

func (c *CdcStreamContext) KafkaPrefix() string

func (*CdcStreamContext) LagTime

func (c *CdcStreamContext) LagTime() string

func (*CdcStreamContext) MarshalJSON

func (c *CdcStreamContext) MarshalJSON() ([]byte, error)

func (*CdcStreamContext) Name

func (c *CdcStreamContext) Name() string

func (*CdcStreamContext) State

func (c *CdcStreamContext) State() string

func (*CdcStreamContext) Tables

func (c *CdcStreamContext) Tables() string

type CloudRegionContext

type CloudRegionContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewCloudRegionContext

func NewCloudRegionContext() *CloudRegionContext

NewCloudRegionContext creates a new context for rendering cloud regions

func (*CloudRegionContext) CountryCode

func (c *CloudRegionContext) CountryCode() string

func (*CloudRegionContext) MarshalJSON

func (c *CloudRegionContext) MarshalJSON() ([]byte, error)

func (*CloudRegionContext) RegionCode

func (c *CloudRegionContext) RegionCode() string

func (*CloudRegionContext) RegionName

func (c *CloudRegionContext) RegionName() string

type ClusterContext

type ClusterContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewClusterContext

func NewClusterContext() *ClusterContext

NewClusterContext creates a new context for rendering cluster

func (*ClusterContext) DataDistribution added in v0.0.6

func (c *ClusterContext) DataDistribution() string

func (*ClusterContext) FaultTolerance added in v0.0.6

func (c *ClusterContext) FaultTolerance() string

func (*ClusterContext) HealthState

func (c *ClusterContext) HealthState() string

func (*ClusterContext) ID added in v0.0.6

func (c *ClusterContext) ID() string

func (*ClusterContext) MarshalJSON

func (c *ClusterContext) MarshalJSON() ([]byte, error)

func (*ClusterContext) Name

func (c *ClusterContext) Name() string

func (*ClusterContext) Nodes

func (c *ClusterContext) Nodes() string

func (*ClusterContext) NodesSpec

func (c *ClusterContext) NodesSpec() string

func (*ClusterContext) Provider added in v0.0.6

func (c *ClusterContext) Provider() string

func (*ClusterContext) Regions

func (c *ClusterContext) Regions() string

Return single region or the first regions with +number of others region

func (*ClusterContext) SoftwareVersion

func (c *ClusterContext) SoftwareVersion() string

func (*ClusterContext) State

func (c *ClusterContext) State() string

func (*ClusterContext) Tier added in v0.0.13

func (c *ClusterContext) Tier() string

type Context

type Context struct {
	// Output is the output stream to which the formatted string is written.
	Output io.Writer
	// Format is used to choose raw, table or custom format for the output.
	Format Format
	// contains filtered or unexported fields
}

Context contains information required by the formatter to print the output as desired.

func (*Context) Write

func (c *Context) Write(sub SubContext, f SubFormat) error

Write the template to the buffer using this Context

type DbAuditLogsExporterContext added in v0.1.19

type DbAuditLogsExporterContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewDbAuditLogsExporterContext added in v0.1.19

func NewDbAuditLogsExporterContext() *DbAuditLogsExporterContext

NewDbAuditContext creates a new context for rendering Db Audit Export Config

func (*DbAuditLogsExporterContext) ClusterId added in v0.1.19

func (a *DbAuditLogsExporterContext) ClusterId() string

func (*DbAuditLogsExporterContext) CreatedAt added in v0.1.19

func (a *DbAuditLogsExporterContext) CreatedAt() string

func (*DbAuditLogsExporterContext) ID added in v0.1.19

func (*DbAuditLogsExporterContext) IntegrationId added in v0.1.19

func (a *DbAuditLogsExporterContext) IntegrationId() string

func (*DbAuditLogsExporterContext) MarshalJSON added in v0.1.19

func (a *DbAuditLogsExporterContext) MarshalJSON() ([]byte, error)

func (*DbAuditLogsExporterContext) State added in v0.1.19

func (*DbAuditLogsExporterContext) YsqlConfig added in v0.1.19

func (a *DbAuditLogsExporterContext) YsqlConfig() string

type EndpointContext added in v0.0.14

type EndpointContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewEndpointContext added in v0.0.14

func NewEndpointContext() *EndpointContext

func (*EndpointContext) Accessibility added in v0.0.14

func (e *EndpointContext) Accessibility() string

func (*EndpointContext) Host added in v0.0.14

func (e *EndpointContext) Host() string

func (*EndpointContext) Id added in v0.0.15

func (e *EndpointContext) Id() string

func (*EndpointContext) MarshalJSON added in v0.0.14

func (e *EndpointContext) MarshalJSON() ([]byte, error)

func (*EndpointContext) Region added in v0.0.14

func (e *EndpointContext) Region() string

func (*EndpointContext) State added in v0.0.14

func (e *EndpointContext) State() string

type Format

type Format string

Format is the format string rendered using the Context

func NewApiKeyFormat added in v0.1.7

func NewApiKeyFormat(source string) Format

func NewBackupFormat

func NewBackupFormat(source string) Format

func NewCMKFormat added in v0.1.5

func NewCMKFormat(source string) Format

func NewCdcSinkFormat

func NewCdcSinkFormat(source string) Format

func NewCdcStreamFormat

func NewCdcStreamFormat(source string) Format

func NewCloudRegionFormat

func NewCloudRegionFormat(source string) Format

func NewClusterFormat

func NewClusterFormat(source string) Format

func NewDbAuditLogsExporterFormat added in v0.1.19

func NewDbAuditLogsExporterFormat(source string) Format

func NewEndpointFormat added in v0.0.14

func NewEndpointFormat(source string) Format

func NewFullBackupFormat added in v0.1.19

func NewFullBackupFormat(source string) Format

func NewFullClusterFormat added in v0.0.6

func NewFullClusterFormat(source string) Format

func NewFullRoleFormat added in v0.1.7

func NewFullRoleFormat(source string) Format

func NewInstanceTypeFormat

func NewInstanceTypeFormat(source string) Format

func NewIntegrationFormat added in v0.1.19

func NewIntegrationFormat(source string, providerType string) Format

func NewMetricsExporterFormat added in v0.1.15

func NewMetricsExporterFormat(source string, metricsType string) Format

func NewNetworkAllowListFormat

func NewNetworkAllowListFormat(source string) Format

func NewNodeFormat added in v0.0.15

func NewNodeFormat(source string) Format

func NewPSEndpointFormat added in v0.0.15

func NewPSEndpointFormat(source string) Format

func NewReadReplicaFormat

func NewReadReplicaFormat(source string) Format

func NewResourcePermissionFormat added in v0.1.7

func NewResourcePermissionFormat(source string) Format

func NewRoleFormat added in v0.1.7

func NewRoleFormat(source string) Format

func NewRolePermissionFormat added in v0.1.7

func NewRolePermissionFormat(source string) Format

func NewUserFormat added in v0.1.7

func NewUserFormat(source string) Format

func NewVPCFormat

func NewVPCFormat(source string) Format

func NewVPCPeeringFormat

func NewVPCPeeringFormat(source string) Format

func (Format) Contains

func (f Format) Contains(sub string) bool

Contains returns true if the format contains the substring

func (Format) IsJSON

func (f Format) IsJSON() bool

IsJSON returns true if the format is the json format

func (Format) IsPrettyJson

func (f Format) IsPrettyJson() bool

IsJSON returns true if the format is the json format

func (Format) IsTable

func (f Format) IsTable() bool

IsTable returns true if the format is a table-type format

type FullBackupContext added in v0.1.19

type FullBackupContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewFullBackupContext added in v0.1.19

func NewFullBackupContext() *FullBackupContext

NewFullBackupContext creates a new context for rendering all backup details

func (*FullBackupContext) SetFullBackup added in v0.1.19

func (b *FullBackupContext) SetFullBackup(backupData ybmclient.BackupData)

func (*FullBackupContext) SubSection added in v0.1.19

func (b *FullBackupContext) SubSection(name string)

func (*FullBackupContext) Write added in v0.1.19

func (b *FullBackupContext) Write() error

type FullClusterContext added in v0.0.6

type FullClusterContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewFullClusterContext added in v0.0.6

func NewFullClusterContext() *FullClusterContext

NewFullClusterContext creates a new context for rendering cluster

func (*FullClusterContext) SetFullCluster added in v0.0.6

func (c *FullClusterContext) SetFullCluster(authApi client.AuthApiClient, clusterData ybmclient.ClusterData)

func (*FullClusterContext) SubSection added in v0.0.6

func (c *FullClusterContext) SubSection(name string)

func (*FullClusterContext) Write added in v0.0.6

func (c *FullClusterContext) Write() error

type FullRoleContext added in v0.1.7

type FullRoleContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewFullRoleContext added in v0.1.7

func NewFullRoleContext() *FullRoleContext

NewFullRoleContext creates a new context for rendering all role details

func (*FullRoleContext) SetFullRole added in v0.1.7

func (r *FullRoleContext) SetFullRole(roleData ybmclient.RoleData)

func (*FullRoleContext) SubSection added in v0.1.7

func (r *FullRoleContext) SubSection(name string)

func (*FullRoleContext) Write added in v0.1.7

func (r *FullRoleContext) Write() error

type HeaderContext

type HeaderContext struct {
	Header interface{}
}

HeaderContext provides the subContext interface for managing headers

func (*HeaderContext) FullHeader

func (c *HeaderContext) FullHeader() interface{}

FullHeader returns the header as an interface

type InstanceTypeContext

type InstanceTypeContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewInstanceTypeContext

func NewInstanceTypeContext() *InstanceTypeContext

NewInstanceTypeContext creates a new context for rendering cloud regions

func (*InstanceTypeContext) AZs

func (c *InstanceTypeContext) AZs() int32

func (*InstanceTypeContext) Cores

func (c *InstanceTypeContext) Cores() int32

func (*InstanceTypeContext) DiskSize

func (c *InstanceTypeContext) DiskSize() int32

func (*InstanceTypeContext) IsEnabled

func (c *InstanceTypeContext) IsEnabled() bool

func (*InstanceTypeContext) MarshalJSON

func (c *InstanceTypeContext) MarshalJSON() ([]byte, error)

func (*InstanceTypeContext) Memory

func (c *InstanceTypeContext) Memory() int32

type IntegrationContext added in v0.1.19

type IntegrationContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewIntegrationContext added in v0.1.19

func NewIntegrationContext() *IntegrationContext

func (*IntegrationContext) AccessID added in v0.1.19

func (tp *IntegrationContext) AccessID() string

Sumologic

func (*IntegrationContext) AccessKey added in v0.1.19

func (tp *IntegrationContext) AccessKey() string

func (*IntegrationContext) AccessTokenPolicy added in v0.1.19

func (tp *IntegrationContext) AccessTokenPolicy() string

func (*IntegrationContext) ApiKey added in v0.1.19

func (tp *IntegrationContext) ApiKey() string

DATADOG

func (*IntegrationContext) ID added in v0.1.19

func (tp *IntegrationContext) ID() string

func (*IntegrationContext) InstallationToken added in v0.1.19

func (tp *IntegrationContext) InstallationToken() string

func (*IntegrationContext) InstanceId added in v0.1.19

func (tp *IntegrationContext) InstanceId() string

func (*IntegrationContext) MarshalJSON added in v0.1.19

func (tp *IntegrationContext) MarshalJSON() ([]byte, error)

func (*IntegrationContext) Name added in v0.1.19

func (tp *IntegrationContext) Name() string

func (*IntegrationContext) OrgSlug added in v0.1.19

func (tp *IntegrationContext) OrgSlug() string

func (*IntegrationContext) Site added in v0.1.19

func (tp *IntegrationContext) Site() string

func (*IntegrationContext) Type added in v0.1.19

func (tp *IntegrationContext) Type() string

func (*IntegrationContext) Zone added in v0.1.19

func (tp *IntegrationContext) Zone() string

GRAFANA

type MetricsExporterContext added in v0.1.15

type MetricsExporterContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewMetricsExporterContext added in v0.1.15

func NewMetricsExporterContext() *MetricsExporterContext

func (*MetricsExporterContext) AccessID added in v0.1.17

func (me *MetricsExporterContext) AccessID() string

Sumologic

func (*MetricsExporterContext) AccessKey added in v0.1.17

func (me *MetricsExporterContext) AccessKey() string

func (*MetricsExporterContext) AccessTokenPolicy added in v0.1.16

func (me *MetricsExporterContext) AccessTokenPolicy() string

func (*MetricsExporterContext) ApiKey added in v0.1.15

func (me *MetricsExporterContext) ApiKey() string

DATADOG

func (*MetricsExporterContext) ID added in v0.1.15

func (me *MetricsExporterContext) ID() string

func (*MetricsExporterContext) InstallationToken added in v0.1.17

func (me *MetricsExporterContext) InstallationToken() string

func (*MetricsExporterContext) InstanceId added in v0.1.16

func (me *MetricsExporterContext) InstanceId() string

func (*MetricsExporterContext) MarshalJSON added in v0.1.15

func (me *MetricsExporterContext) MarshalJSON() ([]byte, error)

func (*MetricsExporterContext) Name added in v0.1.15

func (me *MetricsExporterContext) Name() string

func (*MetricsExporterContext) OrgSlug added in v0.1.16

func (me *MetricsExporterContext) OrgSlug() string

func (*MetricsExporterContext) Site added in v0.1.15

func (me *MetricsExporterContext) Site() string

func (*MetricsExporterContext) Type added in v0.1.15

func (me *MetricsExporterContext) Type() string

func (*MetricsExporterContext) Zone added in v0.1.16

func (me *MetricsExporterContext) Zone() string

GRAFANA

type NetworkAllowListContext

type NetworkAllowListContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewNetworkAllowListContext

func NewNetworkAllowListContext() *NetworkAllowListContext

NewNetworkAllowListContext creates a new context for rendering nal

func (*NetworkAllowListContext) AllowedList

func (c *NetworkAllowListContext) AllowedList() string

func (*NetworkAllowListContext) Clusters

func (c *NetworkAllowListContext) Clusters() string

func (*NetworkAllowListContext) Desc

func (c *NetworkAllowListContext) Desc() string

func (*NetworkAllowListContext) MarshalJSON

func (c *NetworkAllowListContext) MarshalJSON() ([]byte, error)

func (*NetworkAllowListContext) Name

func (c *NetworkAllowListContext) Name() string

type NodeContext added in v0.0.15

type NodeContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewNodeContext added in v0.0.15

func NewNodeContext() *NodeContext

func (*NodeContext) IsMaster added in v0.0.15

func (n *NodeContext) IsMaster() string

func (*NodeContext) IsNodeUp added in v0.0.15

func (n *NodeContext) IsNodeUp() string

func (*NodeContext) IsRR added in v0.0.15

func (n *NodeContext) IsRR() string

func (*NodeContext) IsTserver added in v0.0.15

func (n *NodeContext) IsTserver() string

func (*NodeContext) MemoryUsed added in v0.0.15

func (n *NodeContext) MemoryUsed() string

func (*NodeContext) Name added in v0.0.15

func (n *NodeContext) Name() string

func (*NodeContext) RegionZone added in v0.0.15

func (n *NodeContext) RegionZone() string

type PSEndpointFullContext added in v0.0.15

type PSEndpointFullContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewPSEndpointContext added in v0.0.15

func NewPSEndpointContext() *PSEndpointFullContext

func (*PSEndpointFullContext) ActiveConnections added in v0.0.15

func (ep *PSEndpointFullContext) ActiveConnections() string

func (*PSEndpointFullContext) Az added in v0.0.15

func (ep *PSEndpointFullContext) Az() string

func (*PSEndpointFullContext) MarshalJSON added in v0.0.15

func (ep *PSEndpointFullContext) MarshalJSON() ([]byte, error)

func (*PSEndpointFullContext) SecurityPrincipals added in v0.0.15

func (ep *PSEndpointFullContext) SecurityPrincipals() string

func (*PSEndpointFullContext) ServiceName added in v0.0.15

func (ep *PSEndpointFullContext) ServiceName() string

func (*PSEndpointFullContext) SetFullPSEndpoint added in v0.0.15

func (*PSEndpointFullContext) State added in v0.0.15

func (ep *PSEndpointFullContext) State() string

func (*PSEndpointFullContext) Write added in v0.0.15

func (ep *PSEndpointFullContext) Write() error

type ReadReplicaContext

type ReadReplicaContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewReadReplicaContext

func NewReadReplicaContext() *ReadReplicaContext

NewReadReplicaContext creates a new context for rendering readReplica

func (*ReadReplicaContext) Endpoint

func (c *ReadReplicaContext) Endpoint() string

func (*ReadReplicaContext) MarshalJSON added in v0.1.1

func (c *ReadReplicaContext) MarshalJSON() ([]byte, error)

func (*ReadReplicaContext) Nodes

func (c *ReadReplicaContext) Nodes() string

func (*ReadReplicaContext) NodesSpec

func (c *ReadReplicaContext) NodesSpec() string

func (*ReadReplicaContext) Region

func (c *ReadReplicaContext) Region() string

func (*ReadReplicaContext) State

func (c *ReadReplicaContext) State() string

type ResourcePermissionContext added in v0.1.7

type ResourcePermissionContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewResourcePermissionContext added in v0.1.7

func NewResourcePermissionContext() *ResourcePermissionContext

NewResourcePermissionContext creates a new context for rendering resource permissions

func (*ResourcePermissionContext) MarshalJSON added in v0.1.7

func (r *ResourcePermissionContext) MarshalJSON() ([]byte, error)

func (*ResourcePermissionContext) OperationDescription added in v0.1.7

func (r *ResourcePermissionContext) OperationDescription() string

func (*ResourcePermissionContext) OperationType added in v0.1.7

func (r *ResourcePermissionContext) OperationType() string

func (*ResourcePermissionContext) ResourceName added in v0.1.7

func (r *ResourcePermissionContext) ResourceName() string

func (*ResourcePermissionContext) ResourceType added in v0.1.7

func (r *ResourcePermissionContext) ResourceType() string

type RoleContext added in v0.1.7

type RoleContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewRoleContext added in v0.1.7

func NewRoleContext() *RoleContext

NewRoleContext creates a new context for rendering cluster

func (*RoleContext) ApiKeysCount added in v0.1.7

func (r *RoleContext) ApiKeysCount() int

func (*RoleContext) Description added in v0.1.7

func (r *RoleContext) Description() string

func (*RoleContext) ID added in v0.1.7

func (r *RoleContext) ID() string

func (*RoleContext) MarshalJSON added in v0.1.7

func (r *RoleContext) MarshalJSON() ([]byte, error)

func (*RoleContext) Name added in v0.1.7

func (r *RoleContext) Name() string

func (*RoleContext) RoleType added in v0.1.7

func (r *RoleContext) RoleType() string

func (*RoleContext) UsersCount added in v0.1.7

func (r *RoleContext) UsersCount() int

type SubContext

type SubContext interface {
	FullHeader() interface{}
}

SubContext defines what Context implementation should provide

type SubFormat

type SubFormat func(func(SubContext) error) error

SubFormat is a function type accepted by Write()

type SubHeaderContext

type SubHeaderContext map[string]string

SubHeaderContext is a map destined to formatter header (table format)

func (SubHeaderContext) Label

func (c SubHeaderContext) Label(name string) string

Label returns the header label for the specified string

type UserContext added in v0.1.7

type UserContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewUserContext added in v0.1.7

func NewUserContext() *UserContext

NewUserContext creates a new context for rendering users

func (*UserContext) MarshalJSON added in v0.1.7

func (u *UserContext) MarshalJSON() ([]byte, error)

func (*UserContext) UserEmail added in v0.1.7

func (u *UserContext) UserEmail() string

func (*UserContext) UserName added in v0.1.7

func (u *UserContext) UserName() string

func (*UserContext) UserRole added in v0.1.7

func (u *UserContext) UserRole() string

func (*UserContext) UserState added in v0.1.7

func (u *UserContext) UserState() string

type VPCContext

type VPCContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewVPCContext

func NewVPCContext() *VPCContext

NewVPCContext creates a new context for rendering VPC

func (*VPCContext) CIDR added in v0.0.6

func (c *VPCContext) CIDR() string

func (*VPCContext) Clusters

func (c *VPCContext) Clusters() string

func (*VPCContext) MarshalJSON

func (c *VPCContext) MarshalJSON() ([]byte, error)

func (*VPCContext) Name

func (c *VPCContext) Name() string

func (*VPCContext) Peerings

func (c *VPCContext) Peerings() string

func (*VPCContext) Provider

func (c *VPCContext) Provider() string

func (*VPCContext) Regions added in v0.0.6

func (c *VPCContext) Regions() string

func (*VPCContext) RegionsCIDR

func (c *VPCContext) RegionsCIDR() string

func (*VPCContext) State

func (c *VPCContext) State() string

type VPCPeeringContext

type VPCPeeringContext struct {
	HeaderContext
	Context
	// contains filtered or unexported fields
}

func NewVPCPeeringContext

func NewVPCPeeringContext() *VPCPeeringContext

NewVPCPeeringContext creates a new context for rendering VPC Peering

func (*VPCPeeringContext) AppVPC

func (c *VPCPeeringContext) AppVPC() string

func (*VPCPeeringContext) MarshalJSON

func (c *VPCPeeringContext) MarshalJSON() ([]byte, error)

func (*VPCPeeringContext) Name

func (c *VPCPeeringContext) Name() string

func (*VPCPeeringContext) Provider

func (c *VPCPeeringContext) Provider() string

func (*VPCPeeringContext) Status

func (c *VPCPeeringContext) Status() string

func (*VPCPeeringContext) YbVPC

func (c *VPCPeeringContext) YbVPC() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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