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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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