Giter Site home page Giter Site logo

photo-archive's Introduction

Pictures Archive

This is a very simple archive manager for photos (only CRUD) and it just for refreshing my information about golang.

if you want to take this repository and complete this api you are welcome ^-^

Go get:

`go get github.com/golang-jwt/jwt/v5 v5.2.1`
`go get github.com/gorilla/mux v1.8.1`
`go get github.com/jmoiron/sqlx v1.3.5`
`go get github.com/lib/pq v1.10.9`
`go get golang.org/x/crypto/bcrypt`

Routes:

Route Method Description Json body required Expected Response
'/login' POST use it to login user and create serect token `{"username":"...", "password":"..." }` 200 ok if user found
'/adduser' POST use it to register a new user `{"name":"...", "password":"...", "email":"...", "mobile":"...", "password":"...", "permissions":"..." }` 200 ok
'/addphoto' POST use it to register a new photo `{"name":"...", "photographer":"...", "tags":"..." }` 200 ok
'/addphotographer' POST use it to register a new photographer `{"name":"...", "username":"...", "password":"..." }` 200 ok
'/users' GET use it to get a list of all users 200 ok
'/users/{id}' GET use it to get a specific user by its id 200 ok
'/photos' GET use it to get a list of all photos 200 ok if user found
'/photos/{id}' GET use it to get a specific photo by its id 200 ok
'/photoographers' GET use it to get a list of all photographers data 200 ok
'/photographers/{id}' GET use it to get a specific photographer by its id 200 ok
'/deleteuser/{id}' DELETE delete user by its id 401 no content

Note:

This is not public software, so only admins can add new users to the system.

photo-archive's People

Contributors

maadiab avatar

Watchers

 avatar

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.