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

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