Skip to content

baptistecdr/controld-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

controld-go

controld-go allows you to interact with Control D's API in Go. (obviously)
Report bug · Request feature

GitHub Tag Go Reference Go Report Card

Quick start

go get github.com/baptistecdr/controld-go
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/baptistecdr/controld-go"
)

func main() {
	// Construct a new API object using an API token
	api, err := controld.New(os.Getenv("CONTROLD_API_TOKEN"))
	if err != nil {
		log.Fatal(err)
	}

	// Most API calls require a Context
	ctx := context.Background()

	// Fetch details of the account
	u, err := api.ListUser(ctx)
	if err != nil {
		log.Fatal(err)
	}
	// Print user details
	fmt.Println(u)
}

Bugs and feature requests

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Contributing

Contributions are welcome!

Thanks to

About

controld-go allows you to interact with Control D's API in Go. (obviously)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages