Skip to content

My repository for assignments in "Scalable Web Service with Golang" course from Hacktiv8 × Kominfo.

Notifications You must be signed in to change notification settings

MEvanAW/GoExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoExercise

This is a repository for my assignments in "Scalable Web Service with Golang" course from Hacktiv8 × Kominfo.

Contents

Biodata

Prints name, address, job, and reason to join course of the student with id passed in args.

Run the Code

  1. Open "Biodata" folder.
  2. go run . <student id> in Terminal. valid student id: 0-49

Order API

API server in Go for orders of items.

Prerequisite

  1. Install postgresql if you haven't. Alternatively you can use other RDBMS, but you would need to replace gorm postgres driver with its respective gorm driver.
  2. Create a database with a name of "order-api"

Run the Server

  1. Open "OrderApi" folder.
  2. go run . in Terminal.

Order API Swagger

The Swagger specification defines a set of files required to describe such an API. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages. Additional utilities can also take advantage of the resulting files, such as testing tools.
Swagger is available for this API server. To open swagger UI, open http://localhost:8080/swagger/index.html. OrderApiSwagger

Water and Wind Indicator

Serves a page to display water height and wind speed. Data generated pseudo-randomly.

Run it

  1. Open "WaterWind" folder
  2. go run . in Terminal
  3. Open localhost:8080 in browser

Screenshot

WaterAndWind

MyGram

A social media API to save and comment photos.

Entity Relationship Diagram

Prerequisite

  1. Install postgresql if you haven't. Alternatively you can use other RDBMS, but you would need to replace gorm postgres driver with its respective gorm driver.
  2. Create a database with a name of "mygram"

Run the Server

  1. Open "MyGram" folder.
  2. go run . in Terminal.

MyGram Swagger

Swagger is available for this API server. To open swagger UI, open http://localhost:8080/swagger/index.html. Request paths and bodies strictly follows kode.id materials. MyGramSwagger

Authorize Swagger

  1. Register user if you haven't.
  2. Execute login user. LoginUserInSwagger
  3. Copy the token response.
  4. Authorize with value "Bearer yourToken".

About

My repository for assignments in "Scalable Web Service with Golang" course from Hacktiv8 × Kominfo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published