Documentation
¶
Index ¶
- Constants
- Variables
- func AnyAsString(a any, ff FieldFormatter) (string, error)
- func GetPossibleSelectorsFor(data any) []string
- func ToInterfaceArray[T any](list []T) []interface{}
- type CSV
- type DefaultSelector
- type FieldFormatter
- type FieldSelection
- type Format
- type Formats
- type Formatter
- type JSON
- type PathElem
- type Selector
- type SizeFormatter
- type Table
- type TimeSinceFormatter
Constants ¶
View Source
const SizeName = "size"
View Source
const TimeSince = "time_since"
Variables ¶
View Source
var AliasDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Collections", "collections"), NewFieldSelection("State", "state"), }, Wide: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Description", "description"), NewFieldSelection("Modified At", "modified_at"), NewFieldSelection("Collections", "collections"), NewFieldSelection("State", "state"), }, }
View Source
var ApiKeyDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Name", "name"), NewFieldSelection("Key ID", "key"), NewFieldSelection("Created By", "created_by"), NewFieldSelection("Expiry Time", "expiry_time"), NewFieldSelection("Last Access Time", "last_access_time"), NewFieldSelection("Role", "role"), NewFieldSelection("State", "state"), }, }
View Source
var CollectionDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Status", "status"), { ColumnName: "Size", Path: []PathElem{{FieldName: "stats"}, {FieldName: "total_size"}}, FieldFormatter: SizeFormatter{}, }, { ColumnName: "Last Queried", Path: []PathElem{{FieldName: "stats"}, {FieldName: "last_queried_ms"}}, FieldFormatter: TimeSinceFormatter{}, }, }, Wide: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Description", "description"), NewFieldSelection("Retention", "retention_secs"), NewFieldSelection("Status", "status"), NewFieldSelection("Insert Only", "insert_only"), NewFieldSelection("Read Only", "read_only"), NewFieldSelection("Created By", "created_by"), NewFieldSelection("Created At", "created_at"), }, }
View Source
var FieldFormatters = map[string]FieldFormatter{ SizeName: &SizeFormatter{}, TimeSince: &TimeSinceFormatter{}, }
View Source
var OrganizationDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Name", "display_name"), NewFieldSelection("ID", "id"), NewFieldSelection("User", "rockset_user"), }, Wide: []FieldSelection{ NewFieldSelection("Name", "display_name"), NewFieldSelection("ID", "id"), NewFieldSelection("User", "rockset_user"), NewFieldSelection("External ID", "external_id"), NewFieldSelection("Created At", "created_at"), }, }
View Source
var QueryDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Query ID", "query_id"), NewFieldSelection("Status", "status"), NewFieldSelection("Executed By", "executed_by"), NewFieldSelection("Submitted At", "submitted_at"), NewFieldSelection("User", "rockset_user"), }, Wide: []FieldSelection{ NewFieldSelection("Query ID", "query_id"), NewFieldSelection("Status", "status"), NewFieldSelection("Executed By", "executed_by"), NewFieldSelection("Submitted At", "submitted_at"), NewFieldSelection("Expires At", "expires_at"), NewFieldSelection("SQL", "sql"), }, }
View Source
var QueryLambdaDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Last Updated By", "last_updated_by"), { ColumnName: "Last Updated", Path: []PathElem{{FieldName: "last_updated"}}, FieldFormatter: TimeSinceFormatter{}, }, NewFieldSelection("Latest Version", "latest_version", "version"), NewFieldSelection("Version Count", "version_count"), NewFieldSelection("Collections", "collections"), }, Wide: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Last Updated By", "last_updated_by"), { ColumnName: "Last Updated", Path: []PathElem{{FieldName: "last_updated"}}, FieldFormatter: TimeSinceFormatter{}, }, NewFieldSelection("Latest Version", "latest_version", "version"), NewFieldSelection("Description", "latest_version", "description"), NewFieldSelection("Version Count", "version_count"), NewFieldSelection("Collections", "collections"), }, }
View Source
var QueryLambdaTagDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Tag", "tag_name"), NewFieldSelection("State", "version", "state"), }, Wide: []FieldSelection{ NewFieldSelection("Tag", "tag_name"), NewFieldSelection("State", "version", "state"), NewFieldSelection("Description", "version", "description"), }, }
View Source
var RoleDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Name", "role_name"), NewFieldSelection("Created By", "created_by"), }, Wide: []FieldSelection{ NewFieldSelection("Name", "role_name"), NewFieldSelection("Created By", "created_by"), NewFieldSelection("Description", "description"), }, }
View Source
var SupportedFormats = Formats{CSVFormat, JSONFormat, TableFormat}
View Source
var UserDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("First Name", "first_name"), NewFieldSelection("Last Name", "last_name"), NewFieldSelection("Email", "email"), NewFieldSelection("State", "state"), NewFieldSelection("Created At", "created_at"), }, Wide: []FieldSelection{ NewFieldSelection("First Name", "first_name"), NewFieldSelection("Last Name", "last_name"), NewFieldSelection("Email", "email"), NewFieldSelection("State", "state"), NewFieldSelection("Created At", "created_at"), NewFieldSelection("Roles", "roles"), }, }
View Source
var ViewDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Created By", "creator_email"), NewFieldSelection("State", "state"), }, Wide: []FieldSelection{ NewFieldSelection("Workspace", "workspace"), NewFieldSelection("Name", "name"), NewFieldSelection("Description", "description"), NewFieldSelection("Created By", "creator_email"), NewFieldSelection("Created At", "created_at"), NewFieldSelection("State", "state"), NewFieldSelection("SQL", "query_sql"), }, }
View Source
var VirtualInstanceDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Name", "name"), NewFieldSelection("Description", "description"), NewFieldSelection("State", "state"), NewFieldSelection("Default VI", "default_vi"), NewFieldSelection("Current Size", "current_size"), }, Wide: []FieldSelection{ NewFieldSelection("Name", "name"), NewFieldSelection("ID", "id"), NewFieldSelection("Description", "description"), NewFieldSelection("State", "state"), NewFieldSelection("Default VI", "default_vi"), NewFieldSelection("Current Size", "current_size"), NewFieldSelection("Desired Size", "desired_size"), }, }
View Source
var WorkspaceDefaultSelector = DefaultSelector{ Normal: []FieldSelection{ NewFieldSelection("Name", "name"), NewFieldSelection("Collections", "collection_count"), NewFieldSelection("Created By", "created_by"), NewFieldSelection("Created At", "created_at"), }, Wide: []FieldSelection{ NewFieldSelection("Name", "name"), NewFieldSelection("Description", "description"), NewFieldSelection("Collections", "collection_count"), NewFieldSelection("Created By", "created_by"), NewFieldSelection("Created At", "created_at"), }, }
Functions ¶
func AnyAsString ¶ added in v0.0.9
func AnyAsString(a any, ff FieldFormatter) (string, error)
func GetPossibleSelectorsFor ¶ added in v0.0.9
func ToInterfaceArray ¶
func ToInterfaceArray[T any](list []T) []interface{}
Types ¶
type DefaultSelector ¶ added in v0.0.9
type FieldFormatter ¶ added in v0.0.9
type FieldSelection ¶ added in v0.0.9
type FieldSelection struct { Path []PathElem ColumnName string FieldFormatter FieldFormatter }
func NewFieldSelection ¶ added in v0.0.9
func NewFieldSelection(columnName string, path ...string) FieldSelection
func (FieldSelection) ToString ¶ added in v0.0.9
func (r FieldSelection) ToString() string
type Formatter ¶
type JSON ¶ added in v0.0.6
type JSON struct {
// contains filtered or unexported fields
}
type Selector ¶ added in v0.0.9
type Selector []FieldSelection
func DefaultSelectorFor ¶ added in v0.0.9
func ParseSelectionString ¶ added in v0.0.9
type SizeFormatter ¶ added in v0.0.9
type SizeFormatter struct{}
func (SizeFormatter) FormatField ¶ added in v0.0.9
func (f SizeFormatter) FormatField(a any) (string, error)
func (SizeFormatter) Name ¶ added in v0.0.9
func (f SizeFormatter) Name() string
type TimeSinceFormatter ¶ added in v0.0.9
type TimeSinceFormatter struct{}
func (TimeSinceFormatter) FormatField ¶ added in v0.0.9
func (f TimeSinceFormatter) FormatField(a any) (string, error)
func (TimeSinceFormatter) Name ¶ added in v0.0.9
func (f TimeSinceFormatter) Name() string
Click to show internal directories.
Click to hide internal directories.