Documentation ¶
Index ¶
Constants ¶
View Source
const ( IMDatasourceTypeNone IMDatasourceType = iota IMDatasourceTypeSubscribers = 1 IMDatasourceTypeChannelInfo = 1 << 1 IMDatasourceTypeBlacklist = 1 << 2 IMDatasourceTypeWhitelist = 1 << 3 IMDatasourceTypeSystemUIDs = 1 << 4 )
Variables ¶
View Source
var (
ErrDatasourceNotProcess error = errors.New("datasource not process")
)
Functions ¶
Types ¶
type BussDataSource ¶
type IMDatasource ¶
type IMDatasource struct { // 是否存在数据 HasData func(channelID string, channelType uint8) IMDatasourceType // 获取订阅者 Subscribers func(channelID string, channelType uint8) ([]string, error) // 获取频道信息 ChannelInfo func(channelID string, channelType uint8) (map[string]interface{}, error) // 黑名单列表 Blacklist func(channelID string, channelType uint8) ([]string, error) // 白名单列表 Whitelist func(channelID string, channelType uint8) ([]string, error) // 系统账号 SystemUIDs func() ([]string, error) }
type IMDatasourceType ¶
type IMDatasourceType int
func (IMDatasourceType) Has ¶
func (i IMDatasourceType) Has(d IMDatasourceType) bool
type Module ¶
type Module struct { // 模块名称 Name string // api 路由 SetupAPI func() APIRouter // task 路由 SetupTask func() TaskRouter // 服务 // sql目录 SQLDir *SQLFS // swagger文件 Swagger string // im 数据源 IMDatasource IMDatasource // 业务数据源 BussDataSource BussDataSource // 服务 Service interface{} // 事件 Start func() error Stop func() error }
模块
func GetModuleByName ¶
func GetModules ¶
Click to show internal directories.
Click to hide internal directories.