Skip to content

yellowth/tiktok_tech_immersion_2023

 
 

Repository files navigation

TikTok Tech Immersion 2023

Tests

This project is the backend assignment for the TikTok Tech Immersion Program 2023. It is a simple Instant Messaging platform backend built on Golang, Protobuf, Kitex, Redis and Docker. It is built using this demo template.

1. Setup

Run:

docker compose up -d

in the same directory as docker-compose.yml:

2. Send messages

Send a POST request to localhost:8080/api/send (using Postman or curl) in this format:

eg. Send message "hello" from alex to ben:

curl -X POST 'localhost:8080/api/send?chat=ben:b&sender=alex&text=hello'

3. Pull messages

Send a GET request to localhost:8080/api/pull in this format:

eg. Pull all messages between alex and ben:

curl 'localhost:8080/api/pull?chat=alex:ben&cursor=0&limit=10&reverse=false'

** cursor is the earliest epoch to retrieve messages by time

** limit is the max number of messages to retrieve

** reverse decides whether messages are sorted in ascending order (earliest first)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 67.6%
  • Thrift 16.1%
  • Shell 8.0%
  • Makefile 6.1%
  • Dockerfile 2.2%