Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotLoaded = fmt.Errorf("gist not loaded: %w", fs.ErrInvalid)
ErrNotLoaded is an error that signals that the filesystem is being used while not previously loaded.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS represents a filesystem based on a Github Gist.
func New ¶
New returns a FS based on a given Gist ID, without the username portion. Example "https://gist.github.com/jhchabran/ded2f6727d98e6b0095e62a7813aa7cf"
id = "ded2f6727d98e6b0095e62a7813aa7cf"
func NewWithClient ¶
NewWithClient returns a FS based on a given Gist ID and a given Github Client. Providing an authenticated client or a client with a custom http.Client are possible use cases.
func (*FS) Load ¶
Load fetches the gist content from github, making the file system ready for use. If the underlying Github API call fails, it will return its error.
Click to show internal directories.
Click to hide internal directories.