Giter Site home page Giter Site logo

go-gin's Introduction

Event Management API

About

This Event Management API is a fast, scalable, and robust system designed with the Go programming language and the Gin web framework. It allows users to create, retrieve, and manage events efficiently. This project is ideal for developers looking to implement event management features in their applications or for anyone interested in learning how to build RESTful APIs with Go and Gin.

Features

Create Events: Add new events with details including name, description, location, and time. Fetch Events: Retrieve a list of all events or specific events by ID. Robust Error Handling: Detailed error responses for better debugging. Easy to Set Up: Simple setup process with minimal dependencies.

Getting Started

Prerequisites Go version 1.22 SQLite3

Installation

Clone the repository git clone https://github.com/kortby/go-gin.git

cd event-management-api Install dependencies

This project uses the Gin web framework and the SQLite3 driver, which can be installed using:

go get -u github.com/gin-gonic/gin go get -u github.com/mattn/go-sqlite3

Initialize the database

Run the db.InitDB() function included in the project to set up the database with the required tables.

Start the server

go run main.go The API will be available at http://localhost:8080.

Usage Create an Event

curl -X POST http://localhost:8080/events \ -H 'Content-Type: application/json' \ -d '{"name": "Tech Conference", "description": "Annual Tech Conference", "location": "New York", "datetime": "2024-05-23T10:00:00Z"}' Get All Events

curl http://localhost:8080/events

go-gin's People

Contributors

kortby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.