Giter VIP home page Giter VIP logo

api.inssa.club_clubhouse's Introduction

Release CI Status

api.inssa.club_clubhouse

api.inssa.club의 clubhouse 관련 서비스입니다.
serverless framework를 기반으로하여 serverless.yml 이 작성되어 있습니다.
로컬에서 debug 모드 및 release 모드 serverless 환경에서 apex gateway를 통한 release 모드를 지원합니다.

프로젝트 구조

  • cmd/server
    • 메인 프로젝트 디렉토리
    • 그 안의 구조는 생략
  • configs
    • 환경변수와 같은 설정 파일이 담겨있는 곳

환경 변수

실행에 필요한 환경 변수는 configs/envs.go 에서 확인 할 수 있습니다.

실행

프로젝트의 root에서, 필요한 패키지들을 다운 받기 위해 다음의 명령을 실행해주세요.

go mod tidy

다음의 명령어로 프로젝트를 실행 할 수 있습니다.

make run

바이너리 빌드

리눅스

make build

그 외

go build -ldflags="-s -w" -o bin/main cmd/server/main.go

API 문서

실행하여 문서를 얻기

코드를 실행 하여 /swagger/index.html 로 이동하면, 그 곳에서 문서를 얻고 api들을 테스트 할 수 있습니다.
기본 적으로 8080 포트에서 열리기 때문에, http://localhost:8080/swagger/index.html에서 접근 할 수 있습니다.

직접 문서 파일 얻기

코드를 실행하지 않고 직접 json이나 yaml로 된 문서 파일을 얻고 싶다면, cmd/server/docs 에서 docs.json과 docs.yaml을 얻을 수 있습니다.

문서 업데이트 하기

본 프로젝트의 문서화는 swagger, gin-swagger 을 통해 진행되었습니다. 따라서 자동화된 방식으로 문서 생성을 합니다.
변경사항이 생겼다면 다음의 명령어로 진행 할 수 있습니다.

make docs

api.inssa.club_clubhouse's People

Contributors

code-yeongyu avatar

Watchers

서동휘 avatar 엄서훈 avatar Junho Yeo avatar

api.inssa.club_clubhouse's Issues

Needed APIs for Inssa.club v2

배경

  • 기존 클럽하우스 API에서 사용자 이름으로 검색할 수 없음
  • 앱에서는 잘 작동하는 것으로 보아 업데이트된 다른 엔드포인트가 있긴 한 듯

제안

  1. 사용자 username을 받아 데이터베이스에 있는 데이터를 가져오는 엔드포인트
  • 데이터가 없다면, 404
  • 데이터가 존재한다면
    • Outdated 되었다면, 데이터베이스에 있는 UserID를 사용해서 프로필 업데이트를 시도함
      • 업데이트가 완료되었다면 데이터베이스에 값 저장, 업데이트한 값을 반환
    • Outdated 되지 않았다면 데이터베이스에 있는 값을 그대로 반환
  1. 사용자의 검색어를 받아(username 말고 아마 이름 등) search_users로 검색하고 그 검색결과 배열을 그대로 반환하는 엔드포인트
  2. 사용자 UserID를 입력하면 해당 유저의 프로필을 가져와 데이터베이스에 저장, 반환하는 엔드포인트

Or 새로운 엔드포인트를 찾을 때까지 존버

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.