Skip to content

NikkiAung/lets-go-with-GO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Structure

graph TD
    A[go-fundamentals/] --> B[main.go]
    A --> C[go.mod]
    A --> D[internal/]

    D --> E[app/]
    D --> F[api/]
    D --> G[routes/]

    E --> H[app.go]
    F --> I[post_handler.go]
    G --> J[routes.go]

    B -.- B1[Entry point, server setup]
    C -.- C1[Module: github.com/NikkiAung/go-fundmentals]
    H -.- H1[Application struct, logger, health check]
    I -.- I1[HTTP handlers for posts]
    J -.- J1[Route definitions - chi router]
Loading

Application Flow

flowchart TD
    A[main.go] --> B[app.NewApplication]
    B --> B1[Creates Logger]
    B --> B2[Creates PostHandler]

    B1 & B2 --> C[routes.SetUpRoutes]
    C --> D[chi router with routes]

    D --> E[http.Server.ListenAndServe]

    E --> F{Routes}
    F --> G[GET /health]
    F --> H[GET /posts/id]
    F --> I[POST /posts]

    G --> G1[HealthCheck]
    H --> H1[HandleGetPostByID]
    I --> I1[HandleCreatePost]
Loading

JSON Encode/Decode

flowchart LR
    subgraph Server
        S[Go Struct]
    end

    subgraph Client
        C[JSON]
    end

    S -->|Encode - Response| C
    C -->|Decode - Request| S
Loading

About

CRUD App with Stateful Authentication - mainly focus on Pointer (*), and Memory Address (&), * and & are crazy dude! And is it null or nil bro? 🐇

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages