bootstrap

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskOverwrite

func AskOverwrite(path string) error

AskOverwrite checks if the given path and:

  • if cfg.YesMan flag is set to true - returns nil;
  • if path does not exist, it returns nil;
  • if path exists, it prompts the user to confirm overwriting it, and if the user confirms, it returns nil, otherwise it returns base.ErrOpCancelled

func Database

func Database(dir string, mode string) (*sqlx.DB, dbase.SessionInfo, error)

Database returns the database connection open for writing, and a session info based on the mode and the command line arguments.

func ProgressBar

func ProgressBar(ctx context.Context, lg *slog.Logger, opts ...progressbar.Option) *progressbar.ProgressBar

func SessionInfo

func SessionInfo(mode string) dbase.SessionInfo

func Slack

func Slack(ctx context.Context, opts ...client.Option) (client.Slack, error)

Slack returns the Slack client initialised with the provider from context and a standard set of options initialised from the configuration.

func SlackdumpSession

func SlackdumpSession(ctx context.Context, opts ...slackdump.Option) (*slackdump.Session, error)

SlackdumpSession returns the Slackdump Session initialised with the provider from context and a standard set of options initialised from the configuration. One can provide additional options to override the defaults.

func TimedSpinner

func TimedSpinner(ctx context.Context, w io.Writer, title string, max int, interval time.Duration) (stop func())

TimedSpinner displays a spinner for the duration of the operation. It runs in a separate goroutine and stops once the stop function is called.

Types

This section is empty.

Jump to

Keyboard shortcuts

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