Documentation
¶
Overview ¶
Package output formats command results for human and machine consumers.
Index ¶
- func Database(w io.Writer, database *apiclient.Database, showConnectionString bool)
- func DatabaseCreated(w io.Writer, database *apiclient.Database, showConnectionString bool)
- func Databases(w io.Writer, page *apiclient.PaginatedDatabases, showConnectionString bool)
- func FormatTimeAgo(t time.Time) string
- func FormatTimestamp(t time.Time) string
- func Frontend(w io.Writer, fe *apiclient.Frontend)
- func FrontendCustomDomain(w io.Writer, domain *apiclient.FrontendCustomDomainResponse)
- func FrontendCustomDomains(w io.Writer, entries []FrontendCustomDomainEntry)
- func Frontends(w io.Writer, page *apiclient.PaginatedFrontends)
- func Function(w io.Writer, fn *apiclient.Function)
- func FunctionRuntimes(w io.Writer, runtimes []apiclient.FunctionRuntimeOption)
- func Functions(w io.Writer, page *apiclient.PaginatedFunctions)
- func LocalModeDockerUnavailable(w io.Writer)
- func LocalModeNotRunning(w io.Writer)
- func LocalModeStatus(w io.Writer, details LocalModeStatusDetails)
- func LogEvents(w io.Writer, events []apiclient.LogEvent)
- func LogPartialWarning(w io.Writer, resp *apiclient.GetLogsResponse)
- func Note(w io.Writer, format string, args ...any)
- func PrintLogs(w io.Writer, fetch LogsFetcher) error
- func Project(w io.Writer, project *apiclient.Project)
- func ProjectConfigDeploySummary(w io.Writer, summary *projectconfig.Summary)
- func Projects(w io.Writer, cfg *config.Config, page *apiclient.PaginatedProjects)
- func Scheduler(w io.Writer, scheduler *apiclient.FunctionScheduler)
- func Schedulers(w io.Writer, fn *apiclient.Function, ...)
- func StorageBucket(w io.Writer, bucket *apiclient.StorageBucket)
- func StorageBuckets(w io.Writer, buckets []apiclient.StorageBucket)
- func StorageObject(w io.Writer, bucketName string, object *apiclient.StorageObject)
- func StorageObjects(w io.Writer, bucketName string, page *apiclient.StorageListResponse)
- func StoragePolicies(w io.Writer, bucketName string, policies []apiclient.StoragePolicy)
- func StoragePolicy(w io.Writer, bucketName string, policy *apiclient.StoragePolicy)
- func StorageStats(w io.Writer, stats *apiclient.StorageStats)
- func Success(w io.Writer, format string, args ...any)
- func Truncate(value string, maxLen int) string
- func Variable(w io.Writer, variable *apiclient.Variable)
- func Variables(w io.Writer, page *apiclient.PaginatedVariables)
- func Warning(w io.Writer, format string, args ...any)
- type FrontendCustomDomainEntry
- type LocalModeServiceStatus
- type LocalModeStatusDetails
- type LogsFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseCreated ¶
DatabaseCreated renders a newly created database.
func Databases ¶
func Databases(w io.Writer, page *apiclient.PaginatedDatabases, showConnectionString bool)
Databases renders one database list page.
func FormatTimeAgo ¶
FormatTimeAgo returns a compact relative timestamp or "-".
func FormatTimestamp ¶
FormatTimestamp returns a local RFC3339 timestamp or "-".
func FrontendCustomDomain ¶
func FrontendCustomDomain(w io.Writer, domain *apiclient.FrontendCustomDomainResponse)
FrontendCustomDomain renders one custom domain detail view.
func FrontendCustomDomains ¶
func FrontendCustomDomains(w io.Writer, entries []FrontendCustomDomainEntry)
FrontendCustomDomains renders custom domains configured for frontends.
func Frontends ¶
func Frontends(w io.Writer, page *apiclient.PaginatedFrontends)
Frontends renders one frontend list page.
func FunctionRuntimes ¶
func FunctionRuntimes(w io.Writer, runtimes []apiclient.FunctionRuntimeOption)
FunctionRuntimes renders function runtime options.
func Functions ¶
func Functions(w io.Writer, page *apiclient.PaginatedFunctions)
Functions renders one function list page.
func LocalModeDockerUnavailable ¶
LocalModeDockerUnavailable renders Docker setup guidance for local mode.
func LocalModeNotRunning ¶
LocalModeNotRunning renders the local-mode status when the stack is stopped.
func LocalModeStatus ¶
func LocalModeStatus(w io.Writer, details LocalModeStatusDetails)
LocalModeStatus renders local-mode service status and metadata.
func LogPartialWarning ¶
func LogPartialWarning(w io.Writer, resp *apiclient.GetLogsResponse)
LogPartialWarning renders a warning when log results are incomplete.
func PrintLogs ¶
func PrintLogs(w io.Writer, fetch LogsFetcher) error
PrintLogs renders paginated log events from fetch until the response signals no more pages or the next-token cursor cannot be advanced.
func ProjectConfigDeploySummary ¶
func ProjectConfigDeploySummary(w io.Writer, summary *projectconfig.Summary)
ProjectConfigDeploySummary renders the counts from a `config deploy` run.
func Scheduler ¶
func Scheduler(w io.Writer, scheduler *apiclient.FunctionScheduler)
Scheduler renders one scheduler.
func Schedulers ¶
Schedulers renders schedulers configured for a function.
func StorageBucket ¶
func StorageBucket(w io.Writer, bucket *apiclient.StorageBucket)
StorageBucket renders one bucket detail view.
func StorageBuckets ¶
func StorageBuckets(w io.Writer, buckets []apiclient.StorageBucket)
StorageBuckets renders one bucket list.
func StorageObject ¶
func StorageObject(w io.Writer, bucketName string, object *apiclient.StorageObject)
StorageObject renders one object detail view.
func StorageObjects ¶
func StorageObjects(w io.Writer, bucketName string, page *apiclient.StorageListResponse)
StorageObjects renders one cursor page of objects.
func StoragePolicies ¶
func StoragePolicies(w io.Writer, bucketName string, policies []apiclient.StoragePolicy)
StoragePolicies renders one policy list.
func StoragePolicy ¶
func StoragePolicy(w io.Writer, bucketName string, policy *apiclient.StoragePolicy)
StoragePolicy renders one policy detail view.
func StorageStats ¶
func StorageStats(w io.Writer, stats *apiclient.StorageStats)
StorageStats renders aggregate project storage usage.
Types ¶
type FrontendCustomDomainEntry ¶
type FrontendCustomDomainEntry struct {
FrontendName string
FrontendID string
Domain apiclient.FrontendCustomDomainResponse
}
FrontendCustomDomainEntry contains one frontend custom domain row.
type LocalModeServiceStatus ¶
LocalModeServiceStatus is one local-mode service status row.
type LocalModeStatusDetails ¶
type LocalModeStatusDetails struct {
Services []LocalModeServiceStatus
ProjectID string
UserID string
APIURL string
AnonKey string
ServiceKey string
DatabaseURL string
PSQLCommand string
}
LocalModeStatusDetails contains the data rendered by `volcano status`.
type LogsFetcher ¶
type LogsFetcher func(nextToken string) (*apiclient.GetLogsResponse, error)
LogsFetcher fetches one page of log events. An empty nextToken requests the first page.