-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbima.go
More file actions
47 lines (40 loc) · 1001 Bytes
/
bima.go
File metadata and controls
47 lines (40 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package bima
import (
"context"
configs "github.com/crowdeco/bima/v2/configs"
handlers "github.com/crowdeco/bima/v2/handlers"
paginations "github.com/crowdeco/bima/v2/paginations"
utils "github.com/crowdeco/bima/v2/utils"
elastic "github.com/olivere/elastic/v7"
"github.com/sirupsen/logrus"
"gorm.io/gorm"
)
const VERSION_STRING = "v2.0.5"
type (
Module struct {
Context context.Context
Elasticsearch *elastic.Client
Handler *handlers.Handler
Logger *handlers.Logger
Messenger *handlers.Messenger
Cache *utils.Cache
Paginator *paginations.Pagination
Request *paginations.Request
}
Model struct {
configs.Base
}
Server struct {
Env *configs.Env
Database *gorm.DB
}
Plugin interface {
GetRoutes() []configs.Route
GetLoggers() []logrus.Hook
GetMiddlewares() []configs.Middleware
GetListeners() []configs.Listener
GetServers() []configs.Server
GetUpgrades() []configs.Upgrade
GetVersion() string
}
)