core

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func (*Context) GetCfgInt

func (c *Context) GetCfgInt(section string, name string) int

func (*Context) GetCfgString

func (c *Context) GetCfgString(section string, name string) string

func (*Context) GetConfig

func (c *Context) GetConfig() *config.Config

func (*Context) GetDb

func (c *Context) GetDb() *db.DB

func (*Context) GetDefaultSetInfo

func (c *Context) GetDefaultSetInfo() *config.SetInfo

func (*Context) GetDigestAuth

func (c *Context) GetDigestAuth() *login.DigestAuth

func (*Context) GetLog

func (c *Context) GetLog() *zap.Logger

func (*Context) Go

func (c *Context) Go(handle func())

func (*Context) IsInit

func (c *Context) IsInit() bool

func (*Context) ReStart added in v0.1.12

func (c *Context) ReStart()

func (*Context) SecretProvider

func (c *Context) SecretProvider(user string) string

func (*Context) UpdateSetInfo

func (c *Context) UpdateSetInfo(setInfo *config.SetInfo) error

type DMail

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

func Create

func Create() *DMail

func (*DMail) AddServer

func (m *DMail) AddServer(server Server)

func (*DMail) ReStart added in v0.1.12

func (m *DMail) ReStart()

func (*DMail) Start

func (m *DMail) Start(webPort int, apiPort int)

type IHttpServer

type IHttpServer interface {
	Stop()

	GET(relativePath string, handlers ...web.HandlerFunc)
	POST(relativePath string, handlers ...web.HandlerFunc)
	StaticHandle(relativePath string, filepath string)
	SignIn(relativePath string)
	Logout(relativePath string)
	DELETE(relativePath string, handlers ...web.HandlerFunc)
	PUT(relativePath string, handlers ...web.HandlerFunc)

	GETAuth(relativePath string, handlers ...web.HandlerFunc)
	POSTAuth(relativePath string, handlers ...web.HandlerFunc)
	DELETEAuth(relativePath string, handlers ...web.HandlerFunc)
	PUTAuth(relativePath string, handlers ...web.HandlerFunc)
	// contains filtered or unexported methods
}

func NewHttpServer

func NewHttpServer(name string) IHttpServer

type Server

type Server interface {
	Init(context *Context)
	Name() string
}

Jump to

Keyboard shortcuts

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