diskette

command module
v0.0.0-...-a415e6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2016 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go Report Card Build Status

Diskette

MongoDB + REST API + Authentication + Authorization + Mail Notifications

Status

Under heavy development.

Roadmap

  • REST

    • GET
    # examples:
    http localhost:5025/collection/user
    http localhost:5025/collection/user?q='{"name":"Joe Doe"}'
    http localhost:5025/collection/user?q='{"name":{"$ne":"Joe Doe"}}'
    
    • POST
    # example:
    http POST localhost:5025/collection/user name="Joe Doe" email=joe.doe@gmail.com
    
    • PUT
    # example:
    http PUT localhost:5025/collection/user?q='{"name":"Joe Doe"}' \$set:='{"email":"jdoe@gmail.com"}'
    
    • DELETE
    # example
    http DELETE localhost:5025/collection/user?q='{"name":"Joe Doe"}'
    
  • Authentication

    • sign up
    # example
    http POST localhost:5025/user/signup \
        email=joe.doe@gmail.com password=abc \
        profile:='{"name": "Joe Doe", "language": "en" }'
    
    • confirm sign up
    http POST localhost:5025/user/confirm token=<confirmation_token>
    
    • sign in
    # example
    http POST localhost:5025/user/signin email=joe.doe@gmail.com password=abc
    
    • forgot password
    # example
    http POST localhost:5025/user/forgot-password email=joe.doe@gmail.com
    
    • reset password
    # example
    http POST localhost:5025/user/reset-password token=<reset_token> password=123
    
    • sign out
    http POST localhost:5025/session/signout \
        X-Diskette-Session-Token:<session_token>
    
    • change password
    http POST localhost:5025/session/change-password \
        X-Diskette-Session-Token:<session_token> \
        oldPassword=<old_password> newPassword=<new_password>
    
    • change email
    http POST localhost:5025/session/change-email \
        X-Diskette-Session-Token:<session_token> \
        password=<password> newEmail=<newEmail>
    
    • set profile
    http POST localhost:5025/session/set-profile \
        X-Diskette-Session-Token:<session_token> \
        profile:='{"name": "Joe Doe"}'
    
  • User Management

    • get users
    http localhost:5025/admin/get-users?q=<query> X-Diskette-Session-Token:<session_token>
    
    • create user
    http POST localhost:5025/admin/create-user X-Diskette-Session-Token:<session_token> \
        email="joe.doe@gmail.com" password="123" \
        roles:='["admin"]' profile:='{"name": "Joe Doe", "lang": "en"}'
    
    • change user password
    http POST localhost:5025/admin/change-user-password X-Diskette-Session-Token:<session_token> \
        userId=<user_id> newPassword=<new_password>
    
    • change user email
    http POST localhost:5025/admin/change-user-email X-Diskette-Session-Token:<session_token> \
        userId=<user_id> newEmail=<new_email>
    
    • set user roles
    # example
    http POST localhost:5025/admin/set-user-roles X-Diskette-Session-Token:<session_token> \
        userId=<user_id> newRoles:='["customer"]'
    
    • set user profile
    # example
    http POST localhost:5025/admin/set-user-profile X-Diskette-Session-Token:<session_token> \
        userId=<user_id> newProfile:='{"name": "Joe Doe Jr."}'
    
    • remove users
    # example
    http DELETE localhost:5025/admin/remove-users X-Diskette-Session-Token:<session_token> \
        userIds:='["56bf19d65a1d18b704000001", "56be731d5a1d18accd000001"]'
    
    • signout users
    # example
    http POST localhost:5025/admin/signout-users X-Diskette-Session-Token:<session_token> \
        userIds:='["56bf19d65a1d18b704000001", "56be731d5a1d18accd000001"]'
    
    • suspend users
    # example
    http POST localhost:5025/admin/suspend-users X-Diskette-Session-Token:<session_token> \
        userIds:='["56bf19d65a1d18b704000001", "56be731d5a1d18accd000001"]'
    
    • unsuspend users
    # example
    http POST localhost:5025/admin/unsuspend-users X-Diskette-Session-Token:<session_token> \
        userIds:='["56bf19d65a1d18b704000001", "56be731d5a1d18accd000001"]'
    
    • remove unconfirmed users
    http DELETE localhost:5025/admin/remove-unconfirmed-users X-Diskette-Session-Token:<session_token>
    
    • remove expired reset keys
    http POST localhost:5025/admin/remove-expired-reset-keys X-Diskette-Session-Token:<session_token>
    
  • Authorization

    • Document level access control
    // example
    {
        "blog-post": {
            "read": true,
            "create": "session.userId != null",
            "update": "session.userId === doc.authorId || 'admin' in session.userRoles",
            "remove": "session.userId === doc.authorId || 'admin' in session.userRoles"
        }
    }
    
  • Mail Notifications:

    • send mail
    http POST localhost:5025/sendmail/<key>?q=<query>&l=<language_tag>
    
    • confirm signup
    # example
    http POST localhost:5025/sendmail/confirmSignup?q='{"email":"joe.doe@gmail.com"}'&l="en"
    
    • reset password
    # example
    http POST localhost:5025/sendmail/resetPassword?q='{"email":"joe.doe@gmail.com"}'&l="en"
    
  • Javascript library for usage in the browser

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL