0.0.16 • Published 10 years ago

generator-aurelia-auth-go v0.0.16

Weekly downloads
14
License
MIT
Repository
-
Last release
10 years ago

generator-aurelia-auth-go

A generator for backend of an aurelia app with JWT Authentication (login, register, logout) pages as well as a simple user profile page

Frontend/ui

An Aurelia frontend/ui that works with this is https://github.com/francoishill/generator-aurelia-auth-ui

Current features

Basic workflow

  • Authentication with JWT (login, register, logout)
  • User profile details and changing of Full Name
  • Setting with auto-reload (using github.com/francoishill/golang-common-ddd)
  • Mocking out stuff: look how it's done in Context/RouterContext/RouterContext.go method getUserRepository()

DDD and Repository pattern

Using Repository pattern with Domain Driven Design (golang package https://github.com/francoishill/golang-common-ddd/).

Interface centric

Revolves mainly around golang interface{} to keep things loosely coupled

MVC (or at least the M & C)

Routers & Controller

A router defines what URL pattern maps to a Controllers.

A controller maps to a single url pattern and can handle multiple method types. Look at the login controller for an example:

type controller struct{}

func (c *controller) Post(w http.ResponseWriter, r *http.Request, ctx *RouterContext) {
    ctx.AuthenticationService.BaseLoginHandler(w, r)
}

func NewAuthLoginController() *controller {
    return &controller{}
}

Note the signature Post(..., ctx *RouterContext). It could also be Get(..., ctx *RouterContext). For supported methods, have a look at the Routers/Setup/Controller.go file.

This RouterContext is what holds all our Logging, Services, Repositories, Helpers, etc.

Model

This will be the Repositories and Entities

Db Migration example

Example included in file Db/MysqlMigrations/2015-09-21--10-00_initial_db_setup.sql.

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago