Documentation
¶
Index ¶
- Variables
- func AddApp(ctx context.Context, appInfo *table.TblAppInfo) error
- func AddCollectTable(ctx context.Context, userid uint64, tableID int) error
- func AddDB(ctx context.Context, db *obj.TblDB) (int, error)
- func AddPlugin(ctx context.Context, plugin *table.TblPlugin) (int, error)
- func AddProduct(ctx context.Context, product *TblProduct) (int, error)
- func AddSearchKeyword(ctx context.Context, sk *TblSearchKeyword)
- func AddSearchKeywords(ctx context.Context, sks []*TblSearchKeyword)
- func AddTable(ctx context.Context, tb *obj.TblTable) (int, error)
- func DelCollectTable(ctx context.Context, userid uint64, tableID int) error
- func DelPluginConfigByKey(ctx context.Context, pluginID, version int, key string) error
- func DelSearchKeywords(ctx context.Context, typ int8, sid int, field, skey string)
- func DelTablePlugin(ctx context.Context, id int) error
- func GetAppAccessDB(ctx context.Context, appid uint64, db int) (bool, *table.TblAccessDB, error)
- func GetAppAccessDBListByAppid(ctx context.Context, appid uint64, page, size int) (*proto.Detail, []*table.TblAccessDB, error)
- func GetAppAccessDBListByDBID(ctx context.Context, db, page, size int) (*proto.Detail, []*table.TblAccessDB, error)
- func GetAppAccessDBs(ctx context.Context, appids []uint64, db int) ([]*table.TblAccessDB, error)
- func GetAppAccessDBsPages(ctx context.Context, appids []uint64, db int, page, size int) (*proto.Detail, []*table.TblAccessDB, error)
- func GetAppAccessTable(ctx context.Context, appid uint64, tableID int) (bool, *table.TblAccessTable, error)
- func GetAppAccessTableListByAppid(ctx context.Context, appid uint64, page, size int) (*proto.Detail, []*table.TblAccessTable, error)
- func GetAppAccessTableListByTableID(ctx context.Context, tableID, page, size int) (*proto.Detail, []*table.TblAccessTable, error)
- func GetAppAccessTables(ctx context.Context, appids []uint64, tableID int) ([]*table.TblAccessTable, error)
- func GetAppAccessTablesPages(ctx context.Context, appids []uint64, tableID int, page, size int) (*proto.Detail, []*table.TblAccessTable, error)
- func GetAppDetail(ctx context.Context, appid uint64) (bool, *table.TblAppInfo, error)
- func GetAppList(ctx context.Context, userid uint64, page, size int) (*proto.Detail, []*table.TblAppInfo, error)
- func GetAppListByAppids(ctx context.Context, appids []uint64) ([]*table.TblAppInfo, error)
- func GetCollectTablesID(collectTables []*TblCollectTable) []int
- func GetConfigsByPluginIDVersions(ctx context.Context, idVersions ...int) ([]*table.TblPluginConfig, error)
- func GetCurrentWorkspace(ctx context.Context) (*table.TblWorkspace, error)
- func GetDBByID(ctx context.Context, id int) (bool, *obj.TblDB, error)
- func GetDBByIds(ctx context.Context, ids []int) ([]*obj.TblDB, error)
- func GetDBTables(ctx context.Context, dbID int) ([]*obj.TblTable, error)
- func GetIndexTable(ctx context.Context, page, size int) (*proto.Detail, []*obj.TblTable, error)
- func GetMyAppListByKeyword(ctx context.Context, userid uint64, keyword string, status int8) ([]*table.TblAppInfo, error)
- func GetPluginByID(ctx context.Context, pluginID int) (bool, *table.TblPlugin, error)
- func GetPluginByIDs(ctx context.Context, pluginIDs []int) ([]*table.TblPlugin, error)
- func GetPluginConfigs(ctx context.Context, pluginID, version int) ([]*table.TblPluginConfig, error)
- func GetPluginList(ctx context.Context, page, size int) (*proto.Detail, []*table.TblPlugin, error)
- func GetProductDBs(ctx context.Context, productID int) ([]*obj.TblDB, error)
- func GetSequence(ctx context.Context) (uint64, error)
- func GetTableBackPlugin(ctx context.Context, tableID int, typ int8, frontID int) ([]*table.TblTablePlugin, error)
- func GetTableByID(ctx context.Context, id int) (bool, *obj.TblTable, error)
- func GetTableByIds(ctx context.Context, ids []int) ([]*obj.TblTable, error)
- func GetTableORM(table string) *orm.ORM
- func GetTablePluginByID(ctx context.Context, id int) (bool, *table.TblTablePlugin, error)
- func GetTablePlugins(ctx context.Context, tableID int, typ ...int8) ([]*table.TblTablePlugin, error)
- func GetUserBaseFromUser(user *TblUser) *pb.UsersBase
- func GetUserBasesByIds(ctx context.Context, userIds []uint64) ([]*pb.UsersBase, error)
- func GetUserBasesMapByIds(ctx context.Context, userIds []uint64) (map[uint64]*pb.UsersBase, error)
- func GetWorkspace(ctx context.Context, workspace string) (*table.TblWorkspace, error)
- func GetWorkspaceByID(ctx context.Context, id int) (*table.TblWorkspace, error)
- func InsertAccessDB(ctx context.Context, accessDB *table.TblAccessDB) (int, error)
- func InsertAccessTable(ctx context.Context, accessTable *table.TblAccessTable) (int, error)
- func InsertProductMember(ctx context.Context, member *TblProductMember) (int, error)
- func InsertTablePlugin(ctx context.Context, tablePlugin *table.TblTablePlugin) (int, error)
- func InsertUser(ctx context.Context, user *TblUser) error
- func InsertWorkspaceMember(ctx context.Context, member *TblWorkspaceMember) error
- func ReplacePluginConfig(ctx context.Context, pluginConfig *table.TblPluginConfig) error
- func ReplaceProductMember(ctx context.Context, member horm.Map) error
- func ReplaceWorkspaceMember(ctx context.Context, member horm.Map) error
- func TablesToMap(tables []*obj.TblTable) map[int]*obj.TblTable
- func UpdateAccessDBByID(ctx context.Context, id int, update horm.Map) error
- func UpdateAccessTableByID(ctx context.Context, id int, update horm.Map) error
- func UpdateAppByID(ctx context.Context, appid uint64, update horm.Map) error
- func UpdateDBByID(ctx context.Context, id int, update horm.Map) error
- func UpdatePluginByID(ctx context.Context, id int, update horm.Map) error
- func UpdateProductByID(ctx context.Context, id int, update horm.Map) error
- func UpdateProductMemberByID(ctx context.Context, id int, update horm.Map) error
- func UpdateTableByID(ctx context.Context, id int, update horm.Map) error
- func UpdateTablePluginByID(ctx context.Context, id int, update horm.Map) error
- func UpdateTablePluginByIDs(ctx context.Context, id []int, update horm.Map) error
- func UpdateUserByID(ctx context.Context, id uint64, updateInfo horm.Map) error
- func UpdateWorkspaceByID(ctx context.Context, id int, update horm.Map) error
- func UpdateWorkspaceMemberByID(ctx context.Context, id int, update horm.Map) error
- type TblCollectTable
- type TblProduct
- type TblProductMember
- func GetProductMemberByUser(ctx context.Context, productID int, userid uint64) (bool, *TblProductMember, error)
- func GetProductMemberByUsers(ctx context.Context, productID int, userIds []uint64) ([]*TblProductMember, error)
- func GetProductMembersAll(ctx context.Context, productID, page, size int) (*proto.Detail, []*TblProductMember, error)
- func GetProductMembersJoined(ctx context.Context, productID, page, size int) (*proto.Detail, []*TblProductMember, error)
- type TblSearchKeyword
- type TblUser
- type TblWorkspaceMember
- func GetWorkspaceMemberByUser(ctx context.Context, workspaceID int, userid uint64) (bool, *TblWorkspaceMember, error)
- func GetWorkspaceMemberByUsers(ctx context.Context, workspaceID int, userIds []uint64) ([]*TblWorkspaceMember, error)
- func GetWorkspaceMembersAll(ctx context.Context, workspaceID, page, size int) (*proto.Detail, []*TblWorkspaceMember, error)
- func GetWorkspaceMembersJoined(ctx context.Context, workspaceID, page, size int) (*proto.Detail, []*TblWorkspaceMember, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentWorkspace *table.TblWorkspace
Functions ¶
func AddProduct ¶
func AddProduct(ctx context.Context, product *TblProduct) (int, error)
func AddSearchKeyword ¶
func AddSearchKeyword(ctx context.Context, sk *TblSearchKeyword)
func AddSearchKeywords ¶
func AddSearchKeywords(ctx context.Context, sks []*TblSearchKeyword)
func DelPluginConfigByKey ¶
func DelSearchKeywords ¶
func GetAppAccessDB ¶
func GetAppAccessDBs ¶
func GetAppAccessDBsPages ¶
func GetAppAccessTable ¶
func GetAppAccessTables ¶
func GetAppAccessTablesPages ¶
func GetAppDetail ¶
func GetAppList ¶
func GetAppListByAppids ¶
func GetCollectTablesID ¶
func GetCollectTablesID(collectTables []*TblCollectTable) []int
func GetCurrentWorkspace ¶
func GetCurrentWorkspace(ctx context.Context) (*table.TblWorkspace, error)
func GetIndexTable ¶
func GetMyAppListByKeyword ¶
func GetPluginByID ¶
func GetPluginByIDs ¶
func GetPluginConfigs ¶
func GetPluginList ¶
func GetTableBackPlugin ¶
func GetTablePluginByID ¶
func GetTablePlugins ¶
func GetUserBaseFromUser ¶
func GetUserBasesByIds ¶
func GetUserBasesMapByIds ¶
func GetWorkspace ¶
func GetWorkspaceByID ¶
func InsertAccessDB ¶
func InsertAccessTable ¶
func InsertProductMember ¶
func InsertProductMember(ctx context.Context, member *TblProductMember) (int, error)
func InsertTablePlugin ¶
func InsertWorkspaceMember ¶
func InsertWorkspaceMember(ctx context.Context, member *TblWorkspaceMember) error
func ReplacePluginConfig ¶
func ReplacePluginConfig(ctx context.Context, pluginConfig *table.TblPluginConfig) error
func ReplaceWorkspaceMember ¶
func UpdateAccessDBByID ¶
func UpdateAccessTableByID ¶
func UpdateProductMemberByID ¶
func UpdateTablePluginByID ¶
func UpdateTablePluginByIDs ¶
func UpdateUserByID ¶
func UpdateWorkspaceByID ¶
Types ¶
type TblCollectTable ¶
type TblCollectTable struct { Id int `orm:"id,int,omitempty" json:"id,omitempty"` // id UserID uint64 `orm:"userid,uint64,omitempty" json:"userid,omitempty"` // 用户id TableID int `orm:"table_id,int,omitempty" json:"table_id,omitempty"` // 表id CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
func GetCollectTable ¶
type TblProduct ¶
type TblProduct struct { Id int `orm:"id,int,omitempty" json:"id,omitempty"` // id Name string `orm:"name,string,omitempty" json:"name,omitempty"` // 产品名称 Intro string `orm:"intro,string,omitempty" json:"intro,omitempty"` // 简介 Creator uint64 `orm:"creator,uint64,omitempty" json:"creator,omitempty"` // Creator Manager string `orm:"manager,string,omitempty" json:"manager,omitempty"` // 管理员,多个逗号分隔 Status int8 `orm:"status,int8,omitempty" json:"status,omitempty"` // 1-正常 2-下线 CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
func GetProductByID ¶
func GetProductList ¶
type TblProductMember ¶
type TblProductMember struct { Id int `orm:"id,int,omitempty" json:"id,omitempty"` // member id ProductID int `orm:"product_id,int,omitempty" json:"product_id,omitempty"` // product id UserID uint64 `orm:"userid,uint64,omitempty" json:"userid,omitempty"` // 用户id Role int8 `orm:"role,int8,omitempty" json:"role,omitempty"` // 1-管理员 2-开发者 3-运营者 Status int8 `orm:"status,int8,omitempty" json:"status,omitempty"` // 1-待审批 2-续期审批 3-角色变更审批 4-已加入 5-审批拒绝 6-已退出 JoinTime int64 `orm:"join_time,int,omitempty" json:"join_time,omitempty"` // 加入时间 ExpireType int8 `orm:"expire_type,int8,omitempty" json:"expire_type,omitempty"` // 0: 永久 1: 一个月 2: 三个月 3: 半年 4: 一年 ExpireTime int `orm:"expire_time,int,omitempty" json:"expire_time,omitempty"` // 过期时间 OutTime int `orm:"out_time,int,omitempty" json:"out_time,omitempty"` // 退出时间 ChangeRole int8 `orm:"change_role,int8,omitempty" json:"change_role,omitempty"` // 变更为目标角色 0-无 2-开发者 3-运营者 CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
func GetProductMemberByUser ¶
func GetProductMemberByUsers ¶
func GetProductMembersAll ¶
func GetProductMembersJoined ¶
type TblSearchKeyword ¶
type TblSearchKeyword struct { Id int `orm:"id,int,omitempty" json:"id,omitempty"` // id Type int8 `orm:"type,int8,omitempty" json:"type,omitempty"` // 1-product 2-db 3-table Sid int `orm:"sid,int,omitempty" json:"sid,omitempty"` // 检索id SName string `orm:"sname,string,omitempty" json:"sname,omitempty"` // 检索名 Field string `orm:"field,string,omitempty" json:"field,omitempty"` // 字段 SKey string `orm:"skey,string,omitempty" json:"skey,omitempty"` // 检索key SContent string `orm:"scontent,string,omitempty" json:"scontent,omitempty"` // 检索内容 CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
type TblUser ¶
type TblUser struct { Id uint64 `orm:"id,uint64,omitempty" json:"id,omitempty"` // 用户id Account string `orm:"account,string,omitempty" json:"account,omitempty"` // 账号,可以是 admin,邮箱等。。。 Password string `orm:"password,string,omitempty" json:"password,omitempty"` // 密码 Nickname string `orm:"nickname,string,omitempty" json:"nickname,omitempty"` // 昵称 Mobile string `orm:"mobile,string,omitempty" json:"mobile,omitempty"` // 手机号 Token string `orm:"token,string,omitempty" json:"token,omitempty"` // token AvatarUrl string `orm:"avatar_url,string,omitempty" json:"avatar_url,omitempty"` // 头像 Gender int8 `orm:"gender,int,omitempty" json:"gender,omitempty"` // 性别 1-男 2-女 Company string `orm:"company,string,omitempty" json:"company,omitempty"` // 公司 Department string `orm:"department,string,omitempty" json:"department,omitempty"` // 部门 City string `orm:"city,string,omitempty" json:"city,omitempty"` // 城市 Province string `orm:"province,string,omitempty" json:"province,omitempty"` // 省份 Country string `orm:"country,string,omitempty" json:"country,omitempty"` // 国家 LastLoginTime int `orm:"last_login_time,int,omitempty" json:"last_login_time,omitempty"` // 上次登录时间 LastLoginIP string `orm:"last_login_ip,string,omitempty" json:"last_login_ip,omitempty"` // 上次登录ip CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
func GetUserByAccount ¶
type TblWorkspaceMember ¶
type TblWorkspaceMember struct { Id int `orm:"id,int,omitempty" json:"id,omitempty"` // member id WorkspaceID int `orm:"workspace_id,int,omitempty" json:"workspace_id,omitempty"` // workspace id UserID uint64 `orm:"userid,uint64,omitempty" json:"userid,omitempty"` // 用户id Status int8 `orm:"status,int8,omitempty" json:"status,omitempty"` // 1-待审批 2-续期审批 3-暂未申请 4-已加入 5-审批拒绝 6-已退出 JoinTime int64 `orm:"join_time,int,omitempty" json:"join_time,omitempty"` // 加入时间 ExpireType int8 `orm:"expire_type,int8,omitempty" json:"expire_type,omitempty"` // 0: 永久 1: 一个月 2: 三个月 3: 半年 4: 一年 ExpireTime int `orm:"expire_time,int,omitempty" json:"expire_time,omitempty"` // 过期时间 OutTime int `orm:"out_time,int,omitempty" json:"out_time,omitempty"` // 退出时间 CreatedAt time.Time `orm:"created_at,datetime,omitempty" json:"created_at"` // 记录创建时间 UpdatedAt time.Time `orm:"updated_at,datetime,omitempty" json:"updated_at"` // 记录最后修改时间 }
func GetWorkspaceMembersAll ¶
Click to show internal directories.
Click to hide internal directories.