numbermanager

command module
v0.0.0-...-9334ad4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: BSD-4-Clause Imports: 13 Imported by: 0

README

Number manager

This is a simple API that holds value of numbers. It's great for keeping track of builds in CIs. It can set new values, increment or decrement them. The API is pretty simple and doesn't use any kind of authentication.

Build

With docker:

docker build -t creckx/numbermanager:latest .

Without docker:

go get
go test
go run *.go
# or
go build -o numbermanager *.go

API

Registration
POST /api/number/register
-- no input --

Returns ID of a new number you need to access its value in other API endpoints.

Set
POST /api/number/:id
{"number": 99}

Sets specific value to the number.

Get
GET /api/number/:id

Returns value of the number.

Increment
POST /api/number/:id/incr
-- no input --

Increment the number by one.

Decrement
POST /api/number/:id/decr
-- no input --

Decrement the number by one.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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