mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
747 B
Go
27 lines
747 B
Go
//
|
|
// Copyright (C) 2024 veypi <i@veypi.com>
|
|
// 2024-09-23 16:28:13
|
|
// Distributed under terms of the MIT license.
|
|
//
|
|
// Auto generated by OneBD. DO NOT EDIT
|
|
|
|
package app
|
|
|
|
import (
|
|
"github.com/veypi/OneAuth/cfg"
|
|
"github.com/veypi/OneAuth/libs/auth"
|
|
"github.com/veypi/OneAuth/models"
|
|
"github.com/vyes/vigo"
|
|
"github.com/vyes/vigo/contrib/crud"
|
|
)
|
|
|
|
var Router = vigo.NewRouter()
|
|
var appRouter = Router.SubRouter(":app_id").UseBefore(auth.Check("app", ":app_id", 2))
|
|
|
|
func init() {
|
|
crud.All(appRouter.SubRouter("resource"), cfg.DB, models.Resource{})
|
|
crud.All(appRouter.SubRouter("user"), cfg.DB, models.AppUser{})
|
|
crud.All(appRouter.SubRouter("role"), cfg.DB, models.Role{})
|
|
crud.All(appRouter.SubRouter("access"), cfg.DB, models.Access{})
|
|
}
|