taskcluster-base-go

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MPL-2.0

README

taskcluster-base-go

Build Status GoDoc Coverage Status License

A go (golang) port of taskcluster-base utility functions.

Complete godoc documentation here.

Building

Run build.sh found in the top level directory.

Using

Scopes

Here is an example creating given scopes, required scopes, and evaluating if the given scopes satisfy the required scopes.

package main

import (
	"fmt"
	"github.com/taskcluster/taskcluster-base-go/scopes"
)

func main() {
	givenScopes := scopes.Given{"queue:*", "docker-worker:image:taskcluster/builder:0.5.6"}
	requiredScopes := scopes.Required{{"queue:define-task:aws-provisioner-v1/build-c4-2xlarge", "docker-worker:cache:tc-vcs"}, {"queue:define-task:*"}}
	fmt.Printf("Are scopes satisfied? %v\n", givenScopes.Satisfies(&requiredScopes))
}

See formal definitions for more information about scope satisfaction.

Contributing

Contributions are welcome. Please fork, and issue a Pull Request back with an explanation of your changes.

Travis

Travis build success/failure messages are posted to irc channel #taskcluster-bots on irc.mozilla.org:6697.

TODO

  • Respect assume scopes (query auth service to expand scopes)

Directories

Path Synopsis
Package scopes provides utilities for manipulating and interpreting Taskcluster scopes.
Package scopes provides utilities for manipulating and interpreting Taskcluster scopes.

Jump to

Keyboard shortcuts

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