Categorygithub.com/DerRomtester/testproject-golang-webapi-1
module
0.0.0-20240522221946-f10883870eab
Repository: https://github.com/derromtester/testproject-golang-webapi-1.git
Documentation: pkg.go.dev

# README

Grollmus Golang

 

Grollmus Golang

Github top language Github language count Repository size License

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


:dart: About

A small simple REST API project i found from grollmus

:rocket: Technologies

The following tools were used in this project:

:white_check_mark: Requirements

Before starting :checkered_flag:, you need to have Git and Go installed.

API

Authenticate POST http://localhost:23452/v1/auth

Body: { "username" : "test_user", "password" : "password123" }

==> cookie as result

Create User POST http://localhost:23452/v1/user { "username" : "test_user", "password" : "password123" }

Logout PUT http://localhost:23452/v1/auth

Get all devices GET http://localhost:23452/v1/devices

Get device by id GET http://localhost:23452/v1/device/ID_HERE

Current Session http://localhost:23452/v1/session

Refresh token and cookie PUT http://localhost:23452/v1/refresh

Create devices POST http://localhost:23452/v1/devices

Body: { "devices": [ { "id": "1glmLrTZqf9YZleN", "name": "S7-150009", "deviceTypeId": "Beweis", "failsafe": true, "tempMin": 0, "tempMax": 60, "installationPosition": "horizontal", "insertInto19InchCabinet": true, "motionEnable": true, "siplusCatalog": true, "simaticCatalog": true, "rotationAxisNumber": 0, "positionAxisNumber": 0 }, ] }

Delete all devices DELETE http://localhost:23452/v1/devices

Delete device by its id DELETE http://localhost:23452/v1/device/1glmLrTZqf9YZleN

:checkered_flag: Starting

# Clone this project
$ git clone https://github.com/DerRomtester/testproject-golang-webapi-1.git

# Access
$ cd testproject-golang-webapi-1

# Run the project 
# The server will initialize in the <http://localhost:23452>
$ make start-container

# Build the Binary
$ mkdir bin
$ make build

Made with :heart: by DerRomtester

 

Back to top

# Packages

No description provided by the author
No description provided by the author
No description provided by the author