app

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputTypeJSON = "json"
	OutputTypeText = "text"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) (*App, error)

New creates a new slackdump app.

func (*App) Run

func (app *App) Run(ctx context.Context) error

type Config

type Config struct {
	Creds     SlackCreds
	ListFlags ListFlags

	Output Output

	ChannelIDs   []string
	IncludeFiles bool

	Boost uint
	Burst uint
}

func (*Config) Validate

func (p *Config) Validate() error

Validate checks if the command line parameters have valid values.

type ListFlags

type ListFlags struct {
	Users    bool
	Channels bool
}

func (ListFlags) FlagsPresent

func (lf ListFlags) FlagsPresent() bool

type Output

type Output struct {
	Filename string
	Format   string
}

func (Output) FormatValid

func (out Output) FormatValid() bool

func (Output) IsText

func (out Output) IsText() bool

type SlackCreds

type SlackCreds struct {
	Token  string
	Cookie string
}

func (SlackCreds) Valid

func (c SlackCreds) Valid() bool

Jump to

Keyboard shortcuts

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