package module
v0.1.0 Latest Latest

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 4 Imported by: 1



godoc license

Tiny Go library for the Render API.


go get -u

Getting Started

Querying Sites by Team ID
package main

import (

func main() {
  r := render.New("apiKeyHere")

  services, err := r.ListServices()
  if err != nil {

  for _, service := range services {
    b, _ := json.MarshalIndent(service, "", "    ")
    log.Printf("%s\n\n", string(b))




This section is empty.


This section is empty.


This section is empty.


type Deploy

type Deploy struct {
	ID         string    `json:"id"`
	Commit     string    `json:"commit"`
	Status     string    `json:"status"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
	FinishedAt time.Time `json:"finishedAt"`

type RenderClient

type RenderClient struct {
	// contains filtered or unexported fields

func New

func New(token string) (*RenderClient, error)

func (*RenderClient) ListDeploys

func (r *RenderClient) ListDeploys(serviceID string) ([]Deploy, error)

func (*RenderClient) ListServices

func (r *RenderClient) ListServices() ([]Service, error)

type Response

type Response []ResponseItem

type ResponseItem

type ResponseItem struct {
	Cursor  string  `json:"cursor"`
	Service Service `json:"service,omitempty"`
	Deploy  Deploy  `json:"deploy,omitempty"`

type Service

type Service struct {
	ID                  string         `json:"id"`
	Type                string         `json:"type"`
	Repo                string         `json:"repo"`
	Name                string         `json:"name"`
	AutoDeploy          bool           `json:"autoDeploy"`
	Branch              string         `json:"branch"`
	CreatedAt           time.Time      `json:"createdAt"`
	UpdatedAt           time.Time      `json:"updatedAt"`
	NotifyOnFail        string         `json:"notifyOnFail"`
	OwnerID             string         `json:"ownerId"`
	Slug                string         `json:"slug"`
	Suspenders          []string       `json:"suspenders"`
	Schedule            string         `json:"schedule"`
	LastSuccessfulRunAt time.Time      `json:"lastSuccessfulRunAt"`
	ServiceDetails      ServiceDetails `json:"serviceDetails"`
	Deploys             []Deploy       `json:"deploys"`

type ServiceDetails

type ServiceDetails struct {
	Disk                       map[string]interface{} `json:"disk"`
	Env                        string                 `json:"env"`
	EnvSpecificDetails         ServiceDetailsEnv      `json:"envSpecificDetails"`
	HealthCheckPath            string                 `json:"healthCheckPath"`
	NumInstances               int                    `json:"numInstances"`
	OpenPorts                  map[string]interface{} `json:"openPorts"`
	PublishPath                string                 `json:"publishPath"`
	ParentServer               map[string]interface{} `json:"parentServer"`
	Plan                       string                 `json:"plan"`
	PullRequestPreviewsEnabled bool                   `json:"pullRequestPreviewsEnabled"`
	Region                     string                 `json:"region"`
	URL                        string                 `json:"url"`
	BuildCommand               string                 `json:"buildCommand"`

type ServiceDetailsEnv

type ServiceDetailsEnv struct {
	BuildCommand   string `json:"buildCommand"`
	StartCommand   string `json:"startCommand"`
	DockerCommand  string `json:"dockerCommand"`
	DockerContext  string `json:"dockerContext"`
	DockerfilePath string `json:"dockerfilePath"`

Jump to

Keyboard shortcuts

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