- The source for the cyberdojo/avatars Docker image.
- A docker-containerized stateless micro-service for https://cyber-dojo.org.
- Serves the names and images (jpg/png) for a set of avatars.
Used as a k8s liveness probe.
- returns
- true
{ "ready?": true }
- parameters
- none
{}
Used as a k8s readiness probe.
- returns
- true if the service is ready
{ "ready?": true }
- false if the service is not ready
{ "ready?": false }
- parameters
- none
{}
The git commit sha used to create the Docker image.
- returns
- The 40 character sha String.
- eg
{ "sha": "b28b3e13c0778fe409a50d23628f631f87920ce5" }
- parameters
- none
{}
The names of all 64 avatars.
- returns
- An array of 64 strings
- eg
{ "names": [ "alligator", "antelope", "bat", ..., "whale", "wolf", "zebra" ] }
- parameters
- none
{}
The avatar image with the given index, or the avatar image showing all 64 avatars.
- returns
- An image (eg jpg,png,gif,etc)
- parameters
- if n == 'all', returns the 8x8 image showing all avatars.
- if n == 0..63, returns the image showing the n'th avatar, eg, n==0 returns the 'alligator' image, eg, n==63 returns the 'zebra' image.
- All methods receive a JSON hash.
- The hash contains any method arguments as key-value pairs.
- All methods except image(n) return a JSON hash.
- If the method completes a key equals the method's name.
- If the method raises an exception, a key equals "exception".
- The method image(n) returns a jpg/png image.