GolangUserAPI

command module
v0.0.0-...-1b11cd5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 8 Imported by: 0 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

GolangUserAPI

Overview

An API application, writting in Golang. The API can retrieve, add & delete users.

The application does not communicate with a database. Users are stored in-memory. There are 3 test users in place to experiment with.

The application listens to port 8085, as configured by the following line

log.Fatal(http.ListenAndServe(":8085", muxRouter))

The file API Documentation.md contains the endpoints, expected request and return data of the application.

The application is build and runs on go 1.16.5.

To run the application:

  1. Open a terminal window in the working directory. (Directory where the project is stored on the local system.)
  2. run the following command: go run .

Project structure

main.go

  • Contains API logic and is the starting point of the application.

UserRepository.go

  • Contains logic to manipulate user objects.

User.go

  • Contains the structure of a user object.

go.mod& go.sum

  • Contains information about used packages.

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
⌂ 换网址