model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocColumns

func DocColumns() []string

DocColumns returns the column headers for the documents table.

func DocRowToStrings

func DocRowToStrings(r DocRow) []string

DocRowToStrings converts a DocRow to a string slice for table rendering.

func FormatAge

func FormatAge(timestamp string) string

FormatAge converts an RFC3339 timestamp to a relative time string.

func FormatMetadata

func FormatMetadata(meta []api.CustomMetadata) []string

FormatMetadata formats custom metadata for display.

func OpColumns

func OpColumns() []string

OpColumns returns the column headers for the operations table.

func OpStatus

func OpStatus(op *api.Operation) string

OpStatus returns a human-readable status.

func ShortName

func ShortName(name string) string

ShortName extracts the short ID from a full resource name. e.g., "fileSearchStores/abc123" -> "abc123"

func StoreColumns

func StoreColumns() []string

StoreColumns returns the column headers for the stores table.

func StoreRowToStrings

func StoreRowToStrings(r StoreRow) []string

StoreRowToStrings converts a StoreRow to a string slice for table rendering.

Types

type DocRow

type DocRow struct {
	ID          string
	DisplayName string
	State       string
	MimeType    string
	Size        string
	Age         string
}

DocRow represents a formatted row for the documents table.

func DocToRow

func DocToRow(d *api.Document) DocRow

DocToRow converts an API Document to a display row.

type OpRow

type OpRow struct {
	Name   string
	Store  string
	Type   string
	Status string
}

OpRow represents a formatted row for the operations table.

type StoreRow

type StoreRow struct {
	ID          string
	DisplayName string
	ActiveDocs  string
	PendingDocs string
	FailedDocs  string
	Size        string
	Age         string
}

StoreRow represents a formatted row for the stores table.

func StoreToRow

func StoreToRow(s *api.FileSearchStore) StoreRow

StoreToRow converts an API FileSearchStore to a display row.

type TrackedOp

type TrackedOp struct {
	Operation *api.Operation
	StoreName string
	OpType    string // "Upload"
}

TrackedOp tracks an in-progress operation.

Jump to

Keyboard shortcuts

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