https://github.com/rettetdemdativ/jenkinsrole
Go package that wraps the Jenkins Role Strategy API https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin
https://github.com/rettetdemdativ/jenkinsrole
go-module golang http jenkins package role-api roles
Last synced: 3 months ago
JSON representation
Go package that wraps the Jenkins Role Strategy API https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin
- Host: GitHub
- URL: https://github.com/rettetdemdativ/jenkinsrole
- Owner: rettetdemdativ
- License: mit
- Created: 2019-10-15T15:52:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-08T18:55:28.000Z (over 5 years ago)
- Last Synced: 2025-01-26T12:27:25.287Z (5 months ago)
- Topics: go-module, golang, http, jenkins, package, role-api, roles
- Language: Go
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkinsrole
[](https://travis-ci.org/calmandniceperson/jenkinsrole) [](https://goreportcard.com/report/github.com/calmandniceperson/jenkinsrole) [](https://godoc.org/github.com/calmandniceperson/jenkinsrole)
jenkinsrole is a Go package that wraps the API of the Role Strategy plugin for Jenkins. For additional info regarding the plugin itself, see [the plugin page](https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin).
## Using the package
### Installation / import
In order to use the package, run
```go get github.com/calmandniceperson/jenkinsrole``` and import the package with ```import github.com/calmandniceperson/jenkinsrole```.### Creating a token
In order to use this package, you need to provide a user token to the Client struct. This token can be acquired by entering the respective user's settings in the top right of the Jenkins UI, selecting `Configure` in the menu on the left side and generating a token in the `API Token` section.
### Creating a client
```go
c := &Client {
HostName: "http://localhost:8080",
User: "admin",
Token: "token123",
}
```# License
This package is shared under the [MIT License](https://choosealicense.com/licenses/mit/).