Documentation
¶
Overview ¶
Package drivefs allows Google Drive to be used as a static file server by implementing the http.FileSystem interface.
Usage example:
import ( "log" "net/http" "google.golang.org/api/drive/v3" "github.com/squat/drivefs" ) func main() { ... driveService, err := drive.New(oauthHttpClient) // Handle error. if err != nil { log.Fatal(err) } fs := drivefs.New(driveService) // Simple static webserver: log.Fatal(http.ListenAndServe(":8080", http.FileServer(fs))) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(service *drive.Service) http.FileSystem
New creates a new http.FileSystem backed by Google Drive.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.