Documentation
¶
Index ¶
- func AskOverwrite(path string) error
- func Database(dir string, mode string) (*sqlx.DB, dbase.SessionInfo, error)
- func ProgressBar(ctx context.Context, lg *slog.Logger, opts ...progressbar.Option) *progressbar.ProgressBar
- func SessionInfo(mode string) dbase.SessionInfo
- func Slack(ctx context.Context, opts ...client.Option) (client.Slack, error)
- func SlackdumpSession(ctx context.Context, opts ...slackdump.Option) (*slackdump.Session, error)
- func TimedSpinner(ctx context.Context, w io.Writer, title string, max int, ...) (stop func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskOverwrite ¶
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 ¶
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 ¶
Slack returns the Slack client initialised with the provider from context and a standard set of options initialised from the configuration.
func SlackdumpSession ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.