app

package
v2.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrInvalidInput = errors.New("no valid input")
)

Functions

This section is empty.

Types

type App

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

func New

func New(cfg Config, provider auth.Provider) (*App, error)

New creates a new slackdump app.

func (*App) Close

func (app *App) Close() error

Close closes all open handles.

func (*App) Export

func (app *App) Export(ctx context.Context, name string) error

Export performs the full export of slack workspace in slack export compatible format.

func (*App) Run

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

type Config

type Config struct {
	ListFlags ListFlags

	Input  Input  // parameters of the input
	Output Output // " " output

	Oldest TimeValue // oldest time to dump conversations from
	Latest TimeValue // latest time to dump conversations to

	FilenameTemplate string

	ExportName string

	Options slackdump.Options
}

func (*Config) Validate

func (p *Config) Validate() error

Validate checks if the command line parameters have valid values.

type Input

type Input struct {
	List     []string // Input list
	Filename string   // filename containing the list of Conversation IDs or URLs to download.
}

func (Input) IsValid

func (in Input) IsValid() bool

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 // output format
	Base     string // base directory or zip file
}

func (Output) FormatValid

func (out Output) FormatValid() bool

func (Output) IsText

func (out Output) IsText() bool

type TimeValue

type TimeValue time.Time

func (*TimeValue) Set

func (tv *TimeValue) Set(s string) error

func (*TimeValue) String

func (tv *TimeValue) String() string

Jump to

Keyboard shortcuts

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