toolbelt

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2019 License: MIT Imports: 28 Imported by: 0

README

toolbelt

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DummyConfig

type DummyConfig struct {
	Debug bool
}

type DummyTool

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

func (*DummyTool) Configure

func (t *DummyTool) Configure(config ...interface{})

func (*DummyTool) Dependencies

func (t *DummyTool) Dependencies() []reflect.Type

func (*DummyTool) Start

func (t *DummyTool) Start(belt IBelt)

func (*DummyTool) Stop

func (t *DummyTool) Stop(belt IBelt)

type GinConfig

type GinConfig struct {
	Debug       bool
	HttpAddr    string
	HttpsAddr   string
	HttpsDomain string
	Timeout     time.Duration
	MaxClients  uint
}

type GinTool

type GinTool struct {
	*gin.Engine
	// contains filtered or unexported fields
}

func (*GinTool) Configure

func (t *GinTool) Configure(config ...interface{})

func (*GinTool) Dependencies

func (t *GinTool) Dependencies() []reflect.Type

func (*GinTool) Start

func (t *GinTool) Start(belt IBelt)

func (*GinTool) Stop

func (t *GinTool) Stop(belt IBelt)

type GormConfig

type GormConfig struct {
	Debug          bool
	Dialect        string
	Url            string
	DbMaxIdleConns uint
	DbMaxOpenConns uint
}

type GormTool

type GormTool struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func (*GormTool) Configure

func (t *GormTool) Configure(config ...interface{})

func (*GormTool) Dependencies

func (t *GormTool) Dependencies() []reflect.Type

func (*GormTool) Start

func (t *GormTool) Start(belt IBelt)

func (*GormTool) Stop

func (t *GormTool) Stop(belt IBelt)

type IBelt

type IBelt interface {
	Tool(toolType reflect.Type, config ...interface{}) ITool
	Serve()
	Shutdown()
}

func NewBelt

func NewBelt(configFileName string) IBelt

type ITool

type ITool interface {
	Configure(config ...interface{})
	Dependencies() []reflect.Type
	Start(belt IBelt)
	Stop(belt IBelt)
}

type LogrusConfig

type LogrusConfig struct {
	Level      string
	Filename   string
	MaxSize    uint64
	MaxBackups uint64
	MaxAge     uint
	Email      string

	SmtpAddress  string
	SmtpUsername string
	SmtpPassword string
	SmtpFrom     string
}

type LogrusTool

type LogrusTool struct {
	*logrus.Logger
	// contains filtered or unexported fields
}

func (*LogrusTool) Configure

func (t *LogrusTool) Configure(config ...interface{})

func (*LogrusTool) Dependencies

func (t *LogrusTool) Dependencies() []reflect.Type

func (*LogrusTool) Start

func (t *LogrusTool) Start(belt IBelt)

func (*LogrusTool) Stop

func (t *LogrusTool) Stop(belt IBelt)

type RedisConfig

type RedisConfig struct {
	Debug     bool
	Url, Auth string
	DbIndex   uint
	PoolSize  uint
}

type RedisTool

type RedisTool struct {
	*pool.Pool
	// contains filtered or unexported fields
}

func (*RedisTool) Configure

func (t *RedisTool) Configure(config ...interface{})

func (*RedisTool) Dependencies

func (t *RedisTool) Dependencies() []reflect.Type

func (*RedisTool) Start

func (t *RedisTool) Start(belt IBelt)

func (*RedisTool) Stop

func (t *RedisTool) Stop(belt IBelt)

Jump to

Keyboard shortcuts

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