Documentation ¶
Index ¶
- Variables
- func AuthReset(cacheDir string) error
- func CacheDir() string
- func Dump(ctx context.Context, cfg config.Params, prov auth.Provider) error
- func Export(ctx context.Context, cfg config.Params, prov auth.Provider) error
- func InitProvider(ctx context.Context, cacheDir string, workspace string, creds Credentials) (auth.Provider, error)
- func Run(ctx context.Context, cfg config.Params, prov auth.Provider) error
- type Credentials
- type SlackCreds
Constants ¶
This section is empty.
Variables ¶
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 Export ¶ added in v2.1.0
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) (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.
Types ¶
type Credentials ¶ added in v2.1.0
type SlackCreds ¶ added in v2.0.3
SlackCreds holds the Token and Cookie reference.
func (SlackCreds) AuthProvider ¶ added in v2.0.3
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
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. |
Package ui contains some common UI elements, that use Survey library.
|
Package ui contains some common UI elements, that use Survey library. |