services

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleType_SuperAdmin  RoleType = 0
	RoleType_NormalAdmin RoleType = 1

	AccountState_Normal AccountState = 0
)

Variables

This section is empty.

Functions

func ActiveApp added in v1.0.3

func AddAccount

func AddAccount(ctx context.Context, account, password string, roleType int) errs.AdminErrorCode

func AddApplication added in v1.0.5

func AddApplication(ctx context.Context, application *apimodels.Application) (errs.AdminErrorCode, *apimodels.Application)

func AddBot added in v1.0.7

func ApiAgent

func ApiAgent(method, path, body, appkey, secret string) (int, string)

func BanUsers added in v1.0.5

func BindApps

func BindApps(ctx context.Context, account string, appkeys []string) errs.AdminErrorCode

func CheckAccountState

func CheckAccountState(account string) errs.AdminErrorCode

func CheckLogin

func CheckLogin(account, password string) (errs.AdminErrorCode, *models.Account)

func CreateApp added in v1.0.2

func CreateApp(appInfo models.AppInfo) (errs.AdminErrorCode, *models.AppInfo)

func DelApplications added in v1.0.5

func DelApplications(ctx context.Context, appIds *apimodels.ApplicationIds) errs.AdminErrorCode

func DeleteAccounts

func DeleteAccounts(ctx context.Context, accounts []string) errs.AdminErrorCode

func DisableAccounts

func DisableAccounts(ctx context.Context, accounts []string, isDisable int) errs.AdminErrorCode

func DissolveGroups added in v1.0.5

func DissolveGroups(ctx context.Context, req *apimodels.GroupIds) errs.AdminErrorCode

func GetAgoraConf

func GetAgoraConf(appkey string) (errs.AdminErrorCode, *models.AgoraConfigObj)

func GetEmailConf added in v1.0.5

func GetImConsoleHeaders added in v1.0.3

func GetImConsoleHeaders() map[string]string

func GetLivekitConf

func GetLivekitConf(appkey string) (errs.AdminErrorCode, *models.LivekitConfigObj)

func GetSmsConf

func GetSmsConf(appkey string) (errs.AdminErrorCode, *models.SmsEngineConf)

func GetTranslateConf

func GetTranslateConf(appkey string) (errs.AdminErrorCode, *models.TransEngineConf)

func GetZegoConf

func GetZegoConf(appkey string) (errs.AdminErrorCode, *models.ZegoConfigObj)

func QryAccounts

func QryAccounts(ctx context.Context, limit int64, offset string) (errs.AdminErrorCode, *models.Accounts)

func QryApp

func QryApp(appkey string) *models.AppInfo

func QryApplications added in v1.0.5

func QryApplications(ctx context.Context, appkey string, page, size int64, isPositive bool) (errs.AdminErrorCode, *apimodels.Applications)

func QryApps

func QryApps(ctx context.Context, account string, limit int64, offset string) (errs.AdminErrorCode, *models.Apps)

func QryBots added in v1.0.7

func QryBots(ctx context.Context, appkey, userId, name, offset string, limit int64, isPositive bool) (errs.AdminErrorCode, *apimodels.Bots)

func QryGroupInfo added in v1.0.5

func QryGroupInfo(appkey, groupId string) *apimodels.Group

func QryGroups added in v1.0.5

func QryGroups(ctx context.Context, appkey, groupId, name string, offset string, limit int64, isPositive bool) (errs.AdminErrorCode, *apimodels.Groups)

func QryUserInfo added in v1.0.5

func QryUserInfo(appkey, userId string) *apimodels.User

func QryUsers added in v1.0.5

func QryUsers(ctx context.Context, appkey, userId, name, offset string, limit int64, isPositive bool) (errs.AdminErrorCode, *apimodels.Users)

func SetAgoraConf

func SetAgoraConf(appkey string, req *models.AgoraConfigObj) errs.AdminErrorCode

func SetEmailConf added in v1.0.5

func SetEmailConf(ctx context.Context, req *apimodels.EmailConf) errs.AdminErrorCode

func SetEventSubConfig

func SetEventSubConfig(req *EventSubConfigReq) errs.AdminErrorCode

func SetLivekitConf

func SetLivekitConf(appkey string, req *models.LivekitConfigObj) errs.AdminErrorCode

func SetRtcConf

func SetRtcConf(appkey string, req *RtcConf) errs.AdminErrorCode

func SetSmsConf

func SetSmsConf(appkey string, req *models.SmsEngineConf) errs.AdminErrorCode

func SetTranslateConf

func SetTranslateConf(appkey string, req *models.TransEngineConf) errs.AdminErrorCode

func SetZegoConf

func SetZegoConf(appkey string, req *models.ZegoConfigObj) errs.AdminErrorCode

func UnBanUsers added in v1.0.5

func UnBindApps

func UnBindApps(ctx context.Context, account string, appkeys []string) errs.AdminErrorCode

func UpdApplication added in v1.0.5

func UpdApplication(ctx context.Context, application *apimodels.Application) errs.AdminErrorCode

func UpdPassword

func UpdPassword(account, password, newPassword string) errs.AdminErrorCode

func UpdateAppConfigs

func UpdateAppConfigs(appkey string, configFields map[string]interface{}) errs.AdminErrorCode

func UpdateBot added in v1.0.7

func UpdateBot(req *apimodels.BotReq) (errs.AdminErrorCode, *apimodels.Bot)

Types

type AccountInfo

type AccountInfo struct {
	Account  string
	RoleType RoleType
	State    AccountState
}

func GetAccountInfo

func GetAccountInfo(account string) (*AccountInfo, bool)

type AccountState

type AccountState int

type ActiveAppReq added in v1.0.3

type ActiveAppReq struct {
	License string `json:"license"`
}

type AppConfigs

type AppConfigs struct {
	AppKey  string                 `json:"app_key"`
	Configs map[string]interface{} `json:"configs"`
}

func QryAppConfigs

func QryAppConfigs(appkey string, keys []string) (errs.AdminErrorCode, *AppConfigs)

type ConcurrentConnectItem

type ConcurrentConnectItem struct {
	TimeMark int64 `json:"time_mark"`
	Count    int64 `json:"count"`
}

type EventSubConfigReq

type EventSubConfigReq struct {
	AppKey         string                    `json:"app_key"`
	EventSubConfig *models.EventSubConfigObj `json:"event_sub_config"`
	EventSubSwitch *models.EventSubSwitchObj `json:"event_sub_switch"`
}

type EventSubConfigResp

type EventSubConfigResp struct {
	AppKey         string                    `json:"app_key"`
	EventSubConfig *models.EventSubConfigObj `json:"event_sub_config"`
	EventSubSwitch []*EventSubSwitchModel    `json:"event_sub_switch"`
}

func GetEventSubConfig

func GetEventSubConfig(appkey string) (errs.AdminErrorCode, *EventSubConfigResp)

type EventSubSwitchModel

type EventSubSwitchModel struct {
	Name  string               `json:"name"`
	Items []*models.ConfigItem `json:"items"`
}

type FileConfItem added in v1.0.5

type FileConfItem struct {
	AppKey     string
	FileEngine string
	QiNiu      *fileengines.QiNiuStorage
	Oss        *fileengines.OssStorage
	Minio      *fileengines.MinioStorage
	S3         *fileengines.S3Storage
}

type FileCredErr added in v1.0.5

type FileCredErr int
const (
	FileCredSuccess FileCredErr = 0
	FileCredNoOSS   FileCredErr = 1
	FileCredSignErr FileCredErr = 2
)

func GetFileCred added in v1.0.5

type MsgStatistics

type MsgStatistics struct {
	MsgUp       *Statistics `json:"msg_up,omitempty"`
	MsgDown     *Statistics `json:"msg_down,omitempty"`
	MsgDispatch *Statistics `json:"msg_dispatch,omitempty"`
}

func QryMsgStatistic

func QryMsgStatistic(appkey string, statTypes []StatType, channelType int, start, end int64) *MsgStatistics

type RoleType

type RoleType int

type RtcConf

type RtcConf struct {
	ZegoConf    *models.ZegoConfigObj    `json:"zego_conf,omitempty"`
	AgoraConf   *models.AgoraConfigObj   `json:"agora_conf,omitempty"`
	LivekitConf *models.LivekitConfigObj `json:"livekit_conf,omitempty"`
}

func GetRtcConf

func GetRtcConf(appkey string) (errs.AdminErrorCode, *RtcConf)

type RtcConfReq

type RtcConfReq struct {
	AppKey string   `json:"app_key"`
	Conf   *RtcConf `json:"conf"`
}

type SmsConf

type SmsConf struct {
	AppKey string                `json:"app_key"`
	Conf   *models.SmsEngineConf `json:"conf"`
}

type StatType

type StatType int
const (
	StatType_Up       StatType = 1
	StatType_Dispatch StatType = 2
	StatType_Down     StatType = 3
)

type StatisticMsgItem

type StatisticMsgItem struct {
	Count    int64 `json:"count"`
	TimeMark int64 `json:"time_mark"`
}

type Statistics

type Statistics struct {
	Items          []interface{} `json:"items"`
	TotalUserCount *int64        `json:"total_user_count,omitempty"`
}

func QryChrmConnect

func QryChrmConnect(appkey string, start, end int64) *Statistics

func QryConnect

func QryConnect(appkey string, start, end int64) *Statistics

func QryMaxChrmConnect

func QryMaxChrmConnect(appkey string, start, end int64) *Statistics

func QryMaxChrmConnectV2

func QryMaxChrmConnectV2(appkey string, start, end int64) *Statistics

func QryMaxConnect

func QryMaxConnect(appkey string, start, end int64) *Statistics

func QryUserActivities

func QryUserActivities(appkey string, start, end int64) *Statistics

func QryUserRegiste

func QryUserRegiste(appkey string, start, end int64) *Statistics

type TranslateConf

type TranslateConf struct {
	AppKey string                  `json:"app_key"`
	Conf   *models.TransEngineConf `json:"conf"`
}

type UserActivityItem

type UserActivityItem struct {
	Count    int64 `json:"count"`
	TimeMark int64 `json:"time_mark"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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