Documentation
¶
Overview ¶
Package share renders a session as a self-contained HTML page and uploads it to a paste service for easy URL-based sharing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Uploader ¶
type Uploader interface {
Upload(ctx context.Context, html string) (url string, err error)
Name() string
}
Uploader uploads HTML content somewhere and returns a public URL.
func NewUploader ¶
func NewUploader(cfg config.ShareConfig) (Uploader, error)
NewUploader returns an Uploader for the configured backend. When backend is "" defaults to gist when a token is present, otherwise transfer-sh.
Click to show internal directories.
Click to hide internal directories.