modulepackage
0.0.0-20241221134708-aa642a7c5516
Repository: https://github.com/guneyin/disgo.git
Documentation: pkg.go.dev
# README
Current Status: W.I.P
Please DO NOT use in production
disgo: A very basic cloud disk manager.
Add cloud disk capability to your golang applications
Usage
gc := provider.GoogleConfig{
ApiKey: os.Getenv("DSG_GOOGLE_API_KEY"),
ClientID: os.Getenv("DSG_GOOGLE_CLIENT_ID"),
ClientSecret: os.Getenv("DSG_GOOGLE_SECRET"),
CallBackUrl: "http://localhost:8080/auth/google/callback",
}
accessToken := os.Getenv("DSG_GOOGLE_OAUTH2_TOKEN")
gp := provider.NewGoogle(gc, []byte(accessToken))
user, err := gp.GetAuthorizedUser()
if err != nil {
log.Fatal(err)
}
userData, _ := json.MarshalIndent(user, "", " ")
_ = fmt.Sprintf("%-v", string(userData))
dirs, err := gp.GetDirectoryList("")
if err != nil {
log.Fatal(err)
}
dirsData, _ := json.MarshalIndent(dirs, "", " ")
_ = fmt.Sprintf("%-v", string(dirsData))
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author