folderauth is a Go package that wraps the API of the Folder-based Authorization Strategy plugin for Jenkins.
go get -u github.com/calmandniceperson/folderauth
c, err := folderauth.NewClient(hostname, username, token)
if err != nil {
return err
}
// Use c here
This package is published under the MIT License.