factory

package
v0.0.0-...-85aee89 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Config 需要单独注入的配置

Functions

func HTTPConfig

func HTTPConfig(config *config.Config) (httpConfig.HTTPConfig, error)

HTTPConfig 单独注入 http config

func NewCasbin

func NewCasbin(options *config.Options, adapter persist.Adapter) (*casbin.SyncedEnforcer, func(), error)

NewCasbin Casbin

func NewGorm

func NewGorm(config *config.Config) (*gorm.DB, func(), error)

NewGorm init gorm

func NewIDGenerator

func NewIDGenerator() id.Generator

NewIDGenerator 注入 id 生成器

func OAuth2Config

func OAuth2Config(config *config.Config) (oauth2Config.OAuth2, error)

OAuth2Config 单独注入 OAuth2 config

func SecurityConfig

func SecurityConfig(config *config.Config) (config.Security, error)

SecurityConfig 单独注入 Security config

Types

This section is empty.

Jump to

Keyboard shortcuts

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