Categorygithub.com/farismnrr/golang-authorization-api
modulepackage
0.0.0-20240514125359-b53f99f39e2e
Repository: https://github.com/farismnrr/golang-authorization-api.git
Documentation: pkg.go.dev

# README

Golang Authorization API

This project provides a RESTful API for managing authorization in a Golang application.

Features

  • Authentication using JWT tokens
  • CRUD operations for copyright data
  • Integration with Cloudflare for protection

Installation

  1. Clone the repository:
git clone https://github.com/farismnrr/golang-authorization-api.git
  1. Navigate to the project directory:
cd golang-authorization-api
  1. Install dependencies:
go mod tidy
  1. Create a .env file and Authorization.json file.
  2. Run the application:
go run main.go

Usage

Endpoints

  • GET /: Returns server information.
  • GET /api/{apiVersion}/get-key: Retrieves the private key for authorization using middleware.
  • GET /api/{apiVersion}/copyrights: Retrieves copyright.
  • POST /api/{apiVersion}/copyrights: Adds new copyright.
  • PUT /api/{apiVersion}/copyrights: Updates existing copyright.
  • DELETE /api/{apiVersion}/copyrights: Removes copyright.

License

This project is licensed under the MIT License - see the LICENSE file for details.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author