app

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotTested   = errors.New("warning, EZ-Login 3000 is not tested on this OS, if it doesn't work, use manual login method")
	ErrUnsupported = errors.New("EZ-Login 3000 is not supported on this OS, please use the manual login method")
)

Functions

func AuthReset added in v2.1.0

func AuthReset(cacheDir string) error

AuthReset removes the cached credentials.

func CacheDir added in v2.1.0

func CacheDir() string

func Dump added in v2.1.0

func Dump(ctx context.Context, cfg config.Params, prov auth.Provider) error

func Export added in v2.1.0

func Export(ctx context.Context, cfg config.Params, prov auth.Provider) error

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

func InitProvider added in v2.1.0

func InitProvider(ctx context.Context, cacheDir string, workspace string, creds Credentials, browser browser.Browser, legacy bool) (auth.Provider, error)

InitProvider initialises the auth.Provider depending on provided slack credentials. It returns auth.Provider or an error. The logic diagram is available in the doc/diagrams/auth_flow.puml.

If the creds is empty, it attempts to load the stored credentials. If it finds them, it returns an initialised credentials provider. If not - it returns the auth provider according to the type of credentials determined by creds.AuthProvider, and saves them to an AES-256-CFB encrypted storage.

The storage is encrypted using the hash of the unique machine-ID, supplied by the operating system (see package encio), it makes it impossible to transfer and use the stored credentials on another machine (including virtual), even another operating system on the same machine, unless it's a clone of the source operating system on which the credentials storage was created.

func Run added in v2.1.0

func Run(ctx context.Context, cfg config.Params, prov auth.Provider) error

Run starts the Slackdump.

Types

type Credentials added in v2.1.0

type Credentials interface {
	IsEmpty() bool
	AuthProvider(ctx context.Context, workspace string, browser browser.Browser, legacy bool) (auth.Provider, error)
}

type SlackCreds added in v2.0.3

type SlackCreds struct {
	Token  string
	Cookie string
}

SlackCreds holds the Token and Cookie reference.

func (SlackCreds) AuthProvider added in v2.0.3

func (c SlackCreds) AuthProvider(ctx context.Context, workspace string, browser browser.Browser, legacy bool) (auth.Provider, error)

AuthProvider returns the appropriate auth Provider depending on the values of the token and cookie.

func (SlackCreds) IsEmpty added in v2.1.0

func (c SlackCreds) IsEmpty() bool

func (SlackCreds) Type added in v2.0.3

func (c SlackCreds) Type(ctx context.Context, legacy bool) (auth.Type, error)

Type returns the authentication type that should be used for the current slack creds. If the auth type wasn't tested on the system that the slackdump is being executed on it will return the valid type and ErrNotTested, so that this unfortunate fact could be relayed to the end-user. If the type of the authentication determined is not supported for the current system, it will return ErrUnsupported.

Directories

Path Synopsis
Package emoji provides functions to dump the all slack emojis for a workspace.
Package emoji provides functions to dump the all slack emojis for a workspace.

Jump to

Keyboard shortcuts

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