Categorygithub.com/netlify/netlify-go
modulepackage
0.1.11
Repository: https://github.com/netlify/netlify-go.git
Documentation: pkg.go.dev

# README

BitBallon API Client in Go

See the netlify package on godoc for full library documentation.

Quick Start

First go get github.com/netlify/netlify-go then use in your go project.

import "github.com/netlify/netlify-go"

client := netlify.NewClient(&netlify.Config{AccessToken: AccessToken})

// Create a new site
site, resp, err := client.Sites.Create(&SiteAttributes{
  Name: "site-subdomain",
  CustomDomain: "www.example.com",
  Password: "secret",
  NotificationEmail: "[email protected]",
})

// Deploy a directory
deploy, resp, err := site.Deploys.Create("/path/to/directory")

// Wait for the deploy to process
err := deploy.WaitForReady(0)

// Get a single site
site, resp, err := client.Sites.Get("my-site-id")

// Set the domain of the site
site.CustomDomain = "www.example.com"

// Update the site
resp, err := site.Update()

// Deploy a new version of the site from a zip file
deploy, resp, err := site.Deploys.Create("/path/to/file.zip")
deploy.WaitForReady(0)

// Delete the site
resp, err := site.Destroy()

# Functions

NewClient returns a new netlify API client.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Settings for continuous deployment.
Attributes for site.ProvisionCert.
The netlify Client.
Config is used to configure the netlify client.
Deploy represents a specific deploy of a site.
Info returned when creating a new deploy.
DeployKey for use with continuous deployment setups.
DeployKeysService is used to access all DeployKey related API methods.
DeploysService is used to access all Deploy related API methods.
ErrorResponse is returned when a request to the API fails.
All List methods takes a ListOptions object controlling pagination.
Settings for post processing.
Attributes for setting up continuous deployment.
RequestOptions for doing raw requests to the netlify API.
netlify API Response.
Site represents a netlify Site.
Attributes for Sites.Create.
SitesService is used to access all Site related API methods.
Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp.