client-app-go

command module
v0.0.0-...-3f85c9d Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

Client App Go

Build & run

  • Locally

    go build .
    go run main.go
    	or
    ./client-app-go
    
  • On docker

    docker build . -t client-app-go:latest
    docker run -d --name client-app-go -p 8080:8080 -p 8090:8090 client-app-go:latest
    docker logs client-app-go -f
    

API calls

  • POST
    http POST :8080/apis/users email="matteo.baiguini@rabbit.com" name="Matteo Baiguini" age=33
    http POST :8080/apis/users email="john.doe@rabbit.com" name="John Doe" age=42
    http POST :8080/apis/users email="jane.doe@rabbit.com" name="Jane Doe" age=24
    http POST :8080/apis/users email="clint.eastwood@rabbit.com" name="Clint Eastwood" age=75
    
  • GET
    http :8080/apis/users
    http :8080/apis/users/matteo.baiguini@rabbit.com
    
  • PUT
    http PUT :8080/apis/users id=$(http :8080/apis/users/clint.eastwood@rabbit.com | jq ".id") email="clint.eastwood@rabbit.com" name="Clint Eastwood" age=89
    
  • DELETE
    http DELETE :8080/apis/users/clint.eastwood@rabbit.com
    http DELETE :8080/apis/users
    

REST endpoints

  • GET /users get all
  • GET /users/{email} get by email
  • POST /users insert new
  • PUT /users update
  • DELETE /users delete all
  • DELETE /users/{email} delete by email

Versions

0.0.1
  • rest apis
  • kubernetes probes
  • go structure
  • expose logs
0.0.2 - TODO
  • expose metrics
  • expose traces
0.0.3 - TODO
  • use kustomize for kube manifests

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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