update authorized.go, Makefile, README.md
This commit is contained in:
1 parent
36a3cd067f
commit
42c7f5795d
3 files changed
+61
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
swagger:
|
||||||
|
swag init -g ./pkg/handler/handler.go -o docs
|
||||||
|
release:
|
||||||
|
go run cmd/release/main.go
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# esforum
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
esforum is a simple forum application built in Go. It allows users to create and manage posts in a forum-like environment.
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
```
|
||||||
|
esforum
|
||||||
|
├── cmd
|
||||||
|
│ └── main.go # Entry point of the application
|
||||||
|
├── pkg
|
||||||
|
│ └── esforum
|
||||||
|
│ └── esforum.go # Main logic for the esforum package
|
||||||
|
├── go.mod # Module definition file
|
||||||
|
└── README.md # Project documentation
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setup Instructions
|
||||||
|
1. Clone the repository:
|
||||||
|
```
|
||||||
|
git clone https://github.com/yourusername/esforum.git
|
||||||
|
```
|
||||||
|
2. Navigate to the project directory:
|
||||||
|
```
|
||||||
|
cd esforum
|
||||||
|
```
|
||||||
|
3. Install dependencies:
|
||||||
|
```
|
||||||
|
go mod tidy
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
To run the application, execute the following command:
|
||||||
|
```
|
||||||
|
go run cmd/main.go
|
||||||
|
```
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
- **POST /posts**: Create a new post.
|
||||||
|
- **GET /posts**: Retrieve all posts.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Feel free to submit issues or pull requests for improvements and bug fixes.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package esforum
|
||||||
|
|
||||||
|
type AuthorizedUser struct {
|
||||||
|
Id int64 `json:"id" gorm:"unique;primaryKey;autoIncrement"`
|
||||||
|
Username string `json:"username"`
|
||||||
|
FirstName string `json:"first_name"`
|
||||||
|
LastName string `json:"last_name"`
|
||||||
|
PictureURL string `json:"picture_url"`
|
||||||
|
Email string `json:"email"`
|
||||||
|
Access string `json:"access"`
|
||||||
|
|
||||||
|
TelegramId string `json:"telegram_id"`
|
||||||
|
GoogleId string `json:"google_id"`
|
||||||
|
}
|
||||||
Reference in new issue
Block a user