gosh

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: MIT

README

gosh

Gosh is a Go client library for accessing the SiteHost V1.1 API

Installation

go get -u https://github.com/sitehostnz/gosh

Example

package main

import (
	"context"
	"fmt"

	"github.com/sitehostnz/gosh"

	"log"
	"net/http"
	"os"
)

func main() {
  apiKey := os.Getenv("SH_APIKEY")
  clientId := os.Getenv("SH_CLIENTID")

  sh := gosh.NewClient(apiKey, clientId)
  ctx = context.Background()

  server, err := sh.Servers.Get(ctx, "ch-server1")
  if err != nil {
    log.Fatal(err)
  }
  fmt.Printf("%v", server)
}

Documentation

See our documentation for detailed information about API v1.1.

Contributing

If you're interested in contributing to our project:

License

GoSH is distributed under MIT.

Directories

Path Synopsis
pkg
api
Package api provides the functions to work with SiteHost API.
Package api provides the functions to work with SiteHost API.
api/job
Package job represents our SiteHost `/job` endpoint
Package job represents our SiteHost `/job` endpoint
api/server
Package server represents our SiteHost `/server` API endpoint.
Package server represents our SiteHost `/server` API endpoint.
models
Package models hosts all sharing models between api endpoints.
Package models hosts all sharing models between api endpoints.
utils
Package utils contains our utilities functions.
Package utils contains our utilities functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL