adminapp

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README

AdminApp

提供后台管理站用户相关的基础功能

支持功能

目前支持功能:

  • 授权登录
  • 管理员管理
  • 权限管理(RBAC)
Swagger-API

API文档地址: http://127.0.0.1:40103/swagger/adminservice/doc.json

使用说明
用户AuthHandler

可通过userapp/App下的AuthOption选项获取userApp的C端用户AuthHandler

xxAdmin.AuthOption.AuthHandler=userApp.ApiServer.AuthOption.OptAuthHandler()

Documentation

Overview

@externalDocs.description OpenAPI @externalDocs.url https://swagger.io/resources/open-api/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig() *configstc.AdminAppConfig

NewConfig godoc @Summary CONFIG-配置 @Description CONFIG-配置内容 @Tags admin @Produce json @Success 200 {array} configstc.AdminAppConfig @Router /-admin-config [post]

Types

type ApiServer

type ApiServer struct {
	*apps.ApiServer

	gin_http.AuthOption           //auth相关选项配置
	gin_http.SwaggerOption        //swagger相关选项配置
	gin_http.PProfOption          //pprof选项配置
	gin_http.OperateLogOption     //操作日志
	gin_http.AuthExtendInfoOption //认证扩展信息选项配置
	// contains filtered or unexported fields
}

func NewApiServer

func NewApiServer(di *dig.Container, conf *configstc.AdminAppConfig, logger v1log.ILog) *ApiServer

func (*ApiServer) InitRouter

func (s *ApiServer) InitRouter()

func (*ApiServer) InitRouterForGin

func (s *ApiServer) InitRouterForGin(engine *gin.Engine)

func (*ApiServer) Name

func (s *ApiServer) Name() string

func (*ApiServer) Start

func (s *ApiServer) Start() error

func (*ApiServer) Stop

func (s *ApiServer) Stop() error

type App

type App struct {
	*apps.App

	ApiServer *ApiServer
	// contains filtered or unexported fields
}

func NewApp

func NewApp(di *dig.Container, conf *configstc.AdminAppConfig, logger v1log.ILog) *App

Directories

Path Synopsis
controllers
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.

Jump to

Keyboard shortcuts

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