foreword

package
v0.12.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package foreword provides structures for building foreword messages.

Index

Constants

View Source
const MsgSessionForewordTpl = "Say `help` to see the full list of commands.\n" +
	"Made with :hearts: by Postgres.ai. Bug reports, ideas, and merge requests are welcome: https://gitlab.com/postgres-ai/joe \n" +
	"```" + `
Session started: %s
Idle session timeout: %s
Postgres version: %s
Joe version: %s (%s)
Database: %s
Database size: %s
Database state at: %s (%s ago)
` + "```"

MsgSessionForewordTpl provides a template of session foreword message.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Duration     time.Duration
	SessionID    string
	AppVersion   string
	Edition      string
	DBName       string
	DSA          string
	DSADiff      string
	DBSize       string
	DBVersion    string
	DBVersionNum int
}

Content defines data for a foreword message.

func (*Content) EnrichForewordInfo

func (f *Content) EnrichForewordInfo(ctx context.Context, db *pgxpool.Pool) error

EnrichForewordInfo adds database details to foreword data.

func (*Content) GetForeword

func (f *Content) GetForeword() string

GetForeword returns a foreword message.

Jump to

Keyboard shortcuts

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