agl-go-driver

module
v0.0.0-...-0d233d1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT

README ยถ

agl-go-driver

Go

๐Ÿ’ฌ About

The project is a simple file storage API that allows users to upload and download files.

[!NOTE]

  1. This project was developed following Aprenda Golang's "Imersรฃo Backend" course.
  2. Notes taken during the course are in the notes file.

๐ŸŽจ Architecture

  C4Container
    title Personal Go Drive
    Person(customerA, "Customer A", "A customer of the drive API")

    Enterprise_Boundary(b0, "System") {  
      
      Container(web_interface, "Web Application", "Interface that allows consumers to access Drive API via Web")
      
      Container(api, "API", "Allows customers upload/download files from Drive")

      Container(cli_interface, "CLI", "Interface that allows consumers to access Drive API via terminal")

      Container(worker, "Worker", "Compress files and remove raw files")
      
      ContainerDb(db, "Storage", "Stores the links of the uploaded files")
      
      ContainerQueue(queue, "Queue")
    }

    System(bucket_raw, "Bucket Raw", "Save raw files")
    System(bucket_compress, "Bucket Compress", "Save compress files")

    BiRel(customerA, web_interface, "HTTP")
    BiRel(customerA, cli_interface, "Terminal")
    Rel_D(cli_interface, api, "Save/Get link")
    Rel_D(web_interface, api, "Save/Get link")
    Rel_D(api, db, "Save/Get link")
    Rel_D(api, queue, "Save/Get link")
    Rel_D(api, bucket_raw, "Save/Get link")
    Rel_D(queue, worker, "Get raw files")
    Rel_D(worker, bucket_compress, "Save compressed files")

[!NOTE]

  1. The following diagram was generated using Mermaid.
  2. It is a C4 model diagram at the container level, see more at C4 Model.

๐Ÿ—ƒ Database

  erDiagram
    folder {
        INT id
        INT parent_id
        STRING name
        DATETIME created_at
        DATETIME updated_at
        BOOL deleted
    }

    file {
        INT id
        INT folder_id
        INT owner_id
        STRING name
        STRING type
        STRING path
        DATETIME created_at
        DATETIME updated_at
        BOOL deleted
    }

    user {
        INT id
        STRING name
        STRING login
        STRING password
        DATETIME created_at
        DATETIME updated_at
        DATETIME last_login
        BOOL deleted
    }

    user ||--o{ file : "one to many"
    folder ||--o{ file : "one to many"
    folder ||--o{ folder : "one to many"

๐Ÿ’ป Technologies

(back to top)

๐Ÿ“œ Requirements

(back to top)

๐Ÿ’ฟ Installation

git clone git@github.com:filipe1309/agl-go-driver.git
cd agl-go-driver

(back to top)

๐Ÿƒ Running

make run

Access http://localhost

(back to top)

๐Ÿšฆ Roadmap

  • replace aws-sdk-go with aws-sdk-go-v2

๐Ÿ“ License

MIT

(back to top)

๐Ÿง™โ€โ™‚๏ธ About Me

(back to top)

๐Ÿ‘ Acknowledgments

(back to top)


Done withย ย โ™ฅ๏ธย ย by filipe1309 ๐Ÿ––


Jump to

Keyboard shortcuts

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