display

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatResource added in v0.2.0

type FormatResource struct {
	sdktypes.FormatDescription
	Location string `json:"location,omitempty"`
}

func GetFormatResource added in v0.2.0

func GetFormatResource(ctx context.Context, name string) (*FormatResource, error)

func ListFormatResources added in v0.2.0

func ListFormatResources(ctx context.Context) ([]*FormatResource, error)

func NewFormatResource added in v0.2.0

func NewFormatResource(location string, format *sdktypes.FormatDescription) *FormatResource

func (*FormatResource) GetListData added in v0.2.0

func (r *FormatResource) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

func (*FormatResource) GetShowData added in v0.2.0

func (r *FormatResource) GetShowData() *printers.RowData

GetShowData implements the printers.Showable interface

type PartitionResource

type PartitionResource struct {
	Name        string             `json:"name"`
	Description *string            `json:"description,omitempty"`
	Plugin      string             `json:"plugin"`
	Local       TableResourceFiles `json:"local,omitempty"`
	// contains filtered or unexported fields
}

PartitionResource represents a partition resource and is used for list/show commands

func GetPartitionResource

func GetPartitionResource(ctx context.Context, p *config.Partition, db *database.DuckDb) (*PartitionResource, error)

func ListPartitionResources

func ListPartitionResources(ctx context.Context, db *database.DuckDb) ([]*PartitionResource, error)

func NewPartitionResource added in v0.7.0

func NewPartitionResource(p *config.Partition) *PartitionResource

func (*PartitionResource) GetListData

func (r *PartitionResource) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

func (*PartitionResource) GetShowData

func (r *PartitionResource) GetShowData() *printers.RowData

GetShowData implements the printers.Showable interface

type PluginListDetails

type PluginListDetails struct {
	Name       string   `json:"name"`
	Version    string   `json:"version"`
	Partitions []string `json:"partitions"`
}

func ListPlugins

func ListPlugins(ctx context.Context) ([]*PluginListDetails, error)

func (*PluginListDetails) GetListData

func (r *PluginListDetails) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

type PluginResource

type PluginResource struct {
	Name          string   `json:"name"`
	Version       string   `json:"version"`
	Sources       []string `json:"sources"`
	Partitions    []string `json:"partitions"`
	Tables        []string `json:"tables"`
	FormatTypes   []string `json:"format_types"`
	FormatPresets []string `json:"format_presets"`
}

func GetPluginResource

func GetPluginResource(ctx context.Context, name string) (*PluginResource, error)

func (*PluginResource) GetListData

func (r *PluginResource) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

func (*PluginResource) GetShowData

func (r *PluginResource) GetShowData() *printers.RowData

GetShowData implements the printers.Showable interface

type PrintableResource

type PrintableResource[T printers.Listable] struct {
	Items []T
}

func NewPrintableResource

func NewPrintableResource[T printers.Listable](items ...T) *PrintableResource[T]

func (PrintableResource[T]) GetItems

func (p PrintableResource[T]) GetItems() []T

func (PrintableResource[T]) GetTable

func (p PrintableResource[T]) GetTable() (*printers.Table, error)

type SourceResource

type SourceResource struct {
	Name        string                             `json:"name"`
	Description string                             `json:"description,omitempty"`
	Plugin      string                             `json:"plugin,omitempty"`
	Properties  map[string]*types.PropertyMetadata `json:"properties,omitempty"`
}

func GetSourceResource

func GetSourceResource(ctx context.Context, sourceName string) (*SourceResource, error)

func ListSourceResources

func ListSourceResources(ctx context.Context) ([]*SourceResource, error)

func (*SourceResource) GetListData

func (r *SourceResource) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

func (*SourceResource) GetShowData

func (r *SourceResource) GetShowData() *printers.RowData

GetShowData implements the printers.Showable interface

type TableColumnResource added in v0.2.0

type TableColumnResource struct {
	ColumnName  string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description,omitempty"`
}

TableColumnResource represents a table column for display purposes

type TableResource

type TableResource struct {
	Name        string                `json:"name"`
	Description string                `json:"description,omitempty"`
	Plugin      string                `json:"plugin"`
	Partitions  []string              `json:"partitions,omitempty"`
	Columns     []TableColumnResource `json:"columns"`
	Local       TableResourceFiles    `json:"local,omitempty"`
}

TableResource represents a table resource for display purposes (list/show)

func GetTableResource

func GetTableResource(ctx context.Context, tableName string, db *database.DuckDb) (*TableResource, error)

func ListTableResources

func ListTableResources(ctx context.Context, db *database.DuckDb) ([]*TableResource, error)

func (*TableResource) GetListData

func (r *TableResource) GetListData() *printers.RowData

GetListData implements the printers.Listable interface

func (*TableResource) GetShowData

func (r *TableResource) GetShowData() *printers.RowData

GetShowData implements the printers.Showable interface

type TableResourceFiles

type TableResourceFiles struct {
	FileSize  int64 `json:"file_size"`
	FileCount int64 `json:"file_count"`
	RowCount  int64 `json:"row_count,omitempty"`
}

TableResourceFiles represents the file information and a row count for a table resource

Jump to

Keyboard shortcuts

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