github.com/SupenBysz/gf-admin-community@v0.7.4/sys_service/sdk_aliyun.go (about) 1 // ================================================================================ 2 // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. 3 // You can delete these comments if you wish manually maintain this interface file. 4 // ================================================================================ 5 6 package sys_service 7 8 import ( 9 "context" 10 11 "github.com/SupenBysz/gf-admin-community/sys_model" 12 ) 13 14 type ( 15 ISdkAliyun interface { 16 // GetAliyunSdkToken 通过SDK获取Token (SDK获取方式) 17 GetAliyunSdkToken(ctx context.Context, tokenInfo sys_model.AliyunSdkConfToken, err error) 18 // GetAliyunSdkConfList 获取阿里云SDK应用配置列表 19 GetAliyunSdkConfList(ctx context.Context) ([]*sys_model.AliyunSdkConf, error) 20 // GetAliyunSdkConf 根据identifier标识获取SDK配置信息 21 GetAliyunSdkConf(ctx context.Context, identifier string) (tokenInfo *sys_model.AliyunSdkConf, err error) 22 // SaveAliyunSdkConf 保存SDK应用配信息, isCreate判断是更新还是新建 23 SaveAliyunSdkConf(ctx context.Context, info *sys_model.AliyunSdkConf, isCreate bool) (*sys_model.AliyunSdkConf, error) 24 // DeleteAliyunSdkConf 删除阿里云SDK应用配置信息 25 DeleteAliyunSdkConf(ctx context.Context, identifier string) (bool, error) 26 // GetWsCustomizedChGeneral 中文分词 27 GetWsCustomizedChGeneral(ctx context.Context, text string) (sys_model.AliyunNlpDataRes, error) 28 } 29 ) 30 31 var ( 32 localSdkAliyun ISdkAliyun 33 ) 34 35 func SdkAliyun() ISdkAliyun { 36 if localSdkAliyun == nil { 37 panic("implement not found for interface ISdkAliyun, forgot register?") 38 } 39 return localSdkAliyun 40 } 41 42 func RegisterSdkAliyun(i ISdkAliyun) { 43 localSdkAliyun = i 44 }