Skip to content

szyn/digdag-go-client

Repository files navigation

digdag-go-client

codecov GoDoc

Description

Digdag client library written in Go. (Unofficial)

Requirement

  • digdag server

Install

$ go get -u github.com/szyn/digdag-go-client

Usage

e.g. Get projects infomation

package main

import (
	"fmt"

	digdag "github.com/szyn/digdag-go-client"
)

func main() {
	/*
		default endpoint: http://localhost:65432
		If you want to change endpoint, write as the following.
		client, err := digdag.NewClient("http://hostname:5432", false)
	*/
	client, err := digdag.NewClient("", false)
	if err != nil {
		fmt.Println(err)
	}

	projects, err := client.GetProjects()
	if err != nil {
		fmt.Println(err)
	}
	for _, project := range projects {
		fmt.Println(project.ID, project.Name)
	}
}

See also: Godoc

Contribution

  1. Fork it ( http://github.com/szyn/digdag-go-client )
  2. Create your feature branch ( git checkout -b my-new-feature )
  3. Commit your changes ( git commit -am 'Add some feature' )
  4. Push to the branch ( git push origin my-new-feature )
  5. Run test suite ( go test ./... ) and confirm that it passes
  6. Run gofmt ( gofmt -s )
  7. Create new Pull Request 😆

LICENCE

Apache License 2.0

Author

szyn