services

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 11 Imported by: 3

README

为了防止循环依赖, 这个目录不允许使用@Bean注解

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Init bool

Init 单元测试辅助 如果一个单元测试连配置都都不使用, 想来也无需初始化了

Functions

func GetAllProvider

func GetAllProvider() []interface{}

Types

type Config

type Config struct {
	M map[interface{}]interface{}
}

func NewConfig

func NewConfig(m map[interface{}]interface{}) *Config

func (*Config) Get

func (c *Config) Get() map[interface{}]interface{}

func (*Config) GetBool

func (c *Config) GetBool(key string, def ...bool) bool

func (*Config) GetConfig

func (c *Config) GetConfig(key string) *Config

func (*Config) GetInt

func (c *Config) GetInt(key string, def ...int) int

func (*Config) GetKey

func (c *Config) GetKey(key string) map[interface{}]interface{}

func (*Config) GetString

func (c *Config) GetString(key string, def ...string) string

type Container

type Container struct{}

func NewContainer

func NewContainer() *Container

func (*Container) Run

func (a *Container) Run(servers []constraint.KernelServer)

Run 统一启动服务

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

HttpServer 封装一些被(工具生成的)代码调用的函数

func NewHttpServer

func NewHttpServer() *HttpServer

func (*HttpServer) GetEngine

func (receiver *HttpServer) GetEngine() *gin.Engine

func (*HttpServer) Init

func (receiver *HttpServer) Init()

func (*HttpServer) RunListener

func (receiver *HttpServer) RunListener()

func (*HttpServer) SetDebug

func (receiver *HttpServer) SetDebug(isDebug bool)

func (*HttpServer) SetEngine

func (receiver *HttpServer) SetEngine(engine *gin.Engine)

func (*HttpServer) SetPort

func (receiver *HttpServer) SetPort(port int)

type Redis

type Redis struct {
	*redis.Client
}

func (Redis) Get added in v0.1.9

func (r Redis) Get(key string) *redis.StringCmd

func (Redis) GetBool added in v0.1.9

func (r Redis) GetBool(key string) (bool, bool)

func (Redis) GetFloat32 added in v0.1.9

func (r Redis) GetFloat32(key string) (float32, bool)

func (Redis) GetFloat64 added in v0.1.9

func (r Redis) GetFloat64(key string) (float64, bool)

func (Redis) GetInt added in v0.1.9

func (r Redis) GetInt(key string) (int, bool)

func (Redis) GetInt64 added in v0.1.9

func (r Redis) GetInt64(key string) (int64, bool)

func (Redis) GetString added in v0.1.9

func (r Redis) GetString(key string) (string, bool)

func (Redis) Incr added in v0.1.9

func (r Redis) Incr(key string) (int64, bool)

func (Redis) Set added in v0.1.9

func (r Redis) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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