Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Contact List

A Golang API for manage a simple contact list!


About The Project

It's here a way to manage a contact list using essential methods of HTTP requests and responses!

4 methods, 4 ways to use CRUD:

  • It's possible create a new contact
  • Want read all contacts? You can
  • Update a contact is easy
  • Warning! You can delete a contact

Built With

This API was developed using Go(Golang) and some features/packages.

  • Go

Getting Started

This is an example of how you can implements and use this API from Postman.

Prerequisites

  • Postman
  • Golang

Installation

  1. Clone the repo
    git clone https://github.com/brunodeev/contact-list.git
  2. Initialize go mod and run go mod tidy for update packages
    go mod init example-module
    go mod tidy

Get all contacts (GET)

http://ip:port/contacts

Create contact (POST)

http://ip:port/contacts

In Postman

{
    "name": "Example",
    "phones": [
        {
            "code": "+00",
            "ddd": "000",
            "number": "000000000"
        }
     ]
 }

Update contact (PUT)

http://ip:port/contacts?id=example

In Postman

{
    "name": "NewExample",
    "phones": [
        {
            "code": "+11",
            "ddd": "111",
            "number": "111111111"
        }
     ]
 }

Delete contact (DELETE)

http://ip:port/contacts?id=example

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/contact-feature)
  3. Commit your Changes (git commit -m 'Add some feature contact')
  4. Push to the Branch (git push origin feature/contact-feature)
  5. Open a Pull Request

Contact

Bruno César - bcgmeireles@gmail.com

Project Link: https://github.com/brunodeev/contact-list

About

This is a simple contact list api developed using Golang

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages