arc

command module
v0.0.0-...-5e83000 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: BSD-2-Clause-Patent Imports: 22 Imported by: 0

README

arc

Build Status Go Reference Go Report Test Coverage License

REST API in Go user accounting and authentication.

Features

  • User registration, send activation link per email, user account activation
  • Password strength check
  • Request password reset, send mail with password reset token, password reset
  • User login
  • Refresh token
  • JWT based authentication
  • Tested
  • Swagger specification
  • Authorization
  • Send messages to message queue
  • SSE from message queue

Contribution

  • make gen-swagger regenerates swagger specification
  • make lint lints the project
  • make start starts docker-compose stack
  • make stop stops docker-compose stack
  • make test runs unit tests
  • make test-all runs integration tests (requires docker-stack to be up)
  • make test-cov displays test coverage (requires docker-stack to be up)

Swagger specification

Tips

If token should be parsed from query as well:

r.Use(func(next http.Handler) http.Handler {
    return jwtauth.Verify(s.jwtAuth, jwtauth.TokenFromQuery, jwtauth.TokenFromHeader, jwtauth.TokenFromCookie)(next)
})

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package domain contains domain types.
Package domain contains domain types.
Package handler contains http handlers for the REST interface.
Package handler contains http handlers for the REST interface.
request
Package request contains request data structures and related functions.
Package request contains request data structures and related functions.
response
Package response contains response data structures and related functions.
Package response contains response data structures and related functions.
token
Package token contains token generation implementations.
Package token contains token generation implementations.
Package mw contains Go idiomatic middlewares.
Package mw contains Go idiomatic middlewares.
Package repository contains repository methods abstractions.
Package repository contains repository methods abstractions.
postgres
Package postgres contains repository implementation for postgres database.
Package postgres contains repository implementation for postgres database.
Package send contains message sender abstraction.
Package send contains message sender abstraction.
smtp
Package smtp contains implementation of message sender using SMTP server.
Package smtp contains implementation of message sender using SMTP server.

Jump to

Keyboard shortcuts

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