Skip to content

vedantjoshi84/goapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple go api which returns coin balance only for a authorized user.

Implemented with a mock database.

% go run cmd/api/main.go 
Starting GO API service...

Use Postman or other tool to query the endpoint http://localhost:8000/account/coins/?username=alex with correct Key: Authorization and Value: 123ABC This is particularly for the user alex. Use accordingly by looking at the mock db structure.

It returns a JSON response with Coin Balance and status code.

Returns error message and status code if incorrect values passed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages