Skip to content

equalsgibson/goslide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Slide repository logo
Interact with your Slide devices, agents and restores!

Slide API Version Go Code Coverage Go Reference Go Report Card

Getting Started

This is a library that allows developers to interact with the publicly accessible REST API for Slide, using Go.

Info
Slide is a modern backup solution, purpose built for MSPs (Managed Service Providers)

For a full API reference, see the official Slide API Documentation

Prerequisites

  • Download and install Go, version 1.23+, from the official Go website.
  • Obtain your Slide API Token and review the Authentication section.
  • Open your editor of choice, create a new directory and initialize your Go project.
  • Open a terminal and navigate to the directory of your project, then run: go get github.com/equalsgibson/goslide@latest

Quickstart

After following the above steps, you could create a simple main.go file and include the following to list all your current Slide Devices:

...
	// Create the slide service by calling goslide.NewService
	slide := goslide.NewService(slideAuthToken)

	fmt.Println("Querying Slide API for devices...")

	ctx := context.Background()
	slideDevices := []goslide.Device{}
	if err := slide.Devices().List(ctx, func(response goslide.ListResponse[goslide.Device]) error {
		slideDevices = append(slideDevices, response.Data...)

		return nil
	}); err != nil {
		fmt.Printf("Encountered error while querying devices from Slide API: %s\n", err.Error())

		os.Exit(1)
	}
...

Quickstart Demo

More Examples

To see examples on how this library could be used to create a basic CLI tool, checkout the examples directory.

Contributing

Contributions are what make the open source community such an amazing place to learn, get inspired, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Chris Gibson (@equalsgibson)

Project Link: https://github.com/equalsgibson/slide

About

Slide API Library written in Go

Topics

Resources

License

Stars

Watchers

Forks

Languages