About
Aegis is a SVG badge generation service, icons powered by Font Awesome.
Usage
Query Parameters
NOTE: You can use these query parameters to modify any badges generated from badge services below.
Query parameters for configuring your badge appearance.
Query Parameter |
Description |
Input Format |
Example |
color |
Sets the badge primary color |
RGB Hex Values, CSS Color Keywords |
"fff", "1BACBF", "mediumturquoise" |
icon |
Sets the badge icon |
Any one of the available Font Awesome Icons: <STYLE>/<NAME> |
"brands/github", "regular/star", "solid/star" |
status |
Sets the badge status text |
Any URL-encoded string |
"Build%20Status", "ビルド状態" |
style |
Sets the badge style |
Any one of the 4 available badge styles (classic, flat, plastic, semaphoreci) |
"classic", "flat", "plastic", "semaphoreci" |
subject |
Sets the badge subject text |
Any URL-encoded string |
"Failed", "失敗" |
Static Badge Service
Bitbucket Badge Service
Path |
Description |
Example |
/bitbucket/forks/<USERNAME> /<REPO_SLUG> |
Fork count |
|
/bitbucket/issues/<USERNAME> /<REPO_SLUG> /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=new /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=open /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=resolved /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=on-hold /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=invalid /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=duplicate /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=wontfix /bitbucket/issues/<USERNAME> /<REPO_SLUG> ?state=closed
|
Issue count |
|
/bitbucket/pull-requests/<USERNAME> /<REPO_SLUG> /bitbucket/pull-requests/<USERNAME> /<REPO_SLUG> ?state=open /bitbucket/pull-requests/<USERNAME> /<REPO_SLUG> ?state=declined /bitbucket/pull-requests/<USERNAME> /<REPO_SLUG> ?state=merged /bitbucket/pull-requests/<USERNAME> /<REPO_SLUG> ?state=superseded
|
Pull Request count |
|
Github Badge Service
Path |
Description |
Example |
/github/forks/<OWNER> /<REPOSITORY> |
Fork count |
|
/github/issues/<OWNER> /<REPOSITORY> /github/issues/<OWNER> /<REPOSITORY> ?state=open /github/issues/<OWNER> /<REPOSITORY> ?state=closed
|
Issue count |
|
/github/pull-requests/<OWNER> /<REPOSITORY> /github/pull-requests/<OWNER> /<REPOSITORY> ?state=open /github/pull-requests/<OWNER> /<REPOSITORY> ?state=closed /github/pull-requests/<OWNER> /<REPOSITORY> ?state=merged
|
Pull Request count |
|
/github/stars/<OWNER> /<REPOSITORY> |
Star count |
|
GitLab Badge Service
Path |
Description |
Example |
/gitlab/forks/<NAMESPACE> /<PROJECT_NAME> |
Fork count |
|
/gitlab/issues/<NAMESPACE> /<PROJECT_NAME> /gitlab/issues/<NAMESPACE> /<PROJECT_NAME> ?state=opened /gitlab/issues/<NAMESPACE> /<PROJECT_NAME> ?state=closed
|
Issue count |
|
/gitlab/merge-requests/<NAMESPACE> /<PROJECT_NAME> /gitlab/merge-requests/<NAMESPACE> /<PROJECT_NAME> ?state=opened /gitlab/merge-requests/<NAMESPACE> /<PROJECT_NAME> ?state=closed /gitlab/merge-requests/<NAMESPACE> /<PROJECT_NAME> ?state=locked /gitlab/merge-requests/<NAMESPACE> /<PROJECT_NAME> ?state=merged
|
Merge Request count |
|
/gitlab/stars/<NAMESPACE> /<PROJECT_NAME>
|
Star count |
|
Getting Started
This project includes a Makefile for testing and building the project. To see all available options:
❯ make help
all Runs a clean, build, fmt, lint, test, staticcheck, vet and install
build Builds a dynamic executable or package
bump-version Bump the version in the version file. Set BUMP to [ patch | major | minor ]
clean Cleanup any build binaries or packages
cover Runs go test with coverage
cross Builds the cross-compiled binaries, creating a clean directory structure (eg. GOOS/GOARCH/binary)
fmt Verifies all files have been `gofmt`ed
install Installs the executable or package
lint Verifies `golint` passes
release Builds the cross-compiled binaries, naming them in such a way for release (eg. binary-GOOS-GOARCH)
static Builds a static executable
staticcheck Verifies `staticcheck` passes
tag Create a new git tag to prepare to build a release
test Runs the go tests
vet Verifies `go vet` passes
To run the Aegis server locally, make sure to run make all
or make build
to build the binary & execute it:
❯ ./aegis --github-access-token $GITHUB_ACCESS_TOKEN
{"level":"info","ts":1580194366.3114529,"caller":"service/service.go:71","msg":"Starting Aegis badge generation service...","Version":"1.0.0","GitHash":"7591664-dirty","NumCPU":4}
{"level":"info","ts":1580194366.3115368,"caller":"service/service.go:77","msg":"Initializing services..."}
{"level":"info","ts":1580194366.3117702,"caller":"service/service.go:115","msg":"HTTP server listening...","Port":8080}
License
Aegis is MIT licensed.