Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the instance of the downloader.
func (*Client) AsyncDownloader ¶
func (*Client) Download ¶
Download requires a started downloader, otherwise it will return ErrNotStarted. Will place the file to the download queue.
type FilenameFunc ¶
FilenameFunc is the file naming function that should return the output filename for slack.File.
var Filename FilenameFunc = stdFilenameFn
Filename returns name of the file generated from the slack.File.
type GetFiler ¶
type GetFiler interface { // GetFile retreives a given file from its private download URL GetFileContext(ctx context.Context, downloadURL string, writer io.Writer) error }
GetFiler is the file downloader interface. It exists primarily for mocking in tests.
type Option ¶
type Option func(*options)
Option is the function signature for the option functions.
func WithLogger ¶
Logger allows to use an external log library, that satisfies the *slog.Logger.
Click to show internal directories.
Click to hide internal directories.