golang-authorization-api

command module
v0.0.0-...-13420bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL