서비스 디테일과 서비스 서머리 분리
This commit is contained in:
@ -197,9 +197,10 @@ type serviceDescription struct {
|
||||
updateUserinfo func(info usertokeninfo) (bool, string, string)
|
||||
getProviderInfo func(platform string, uid string) (string, string, error)
|
||||
|
||||
apiUsers unsafe.Pointer
|
||||
divisionsSerialized unsafe.Pointer
|
||||
serviceSerialized unsafe.Pointer
|
||||
apiUsers unsafe.Pointer
|
||||
divisionsSerialized unsafe.Pointer
|
||||
serviceSerialized unsafe.Pointer
|
||||
serviceSummarySerialized unsafe.Pointer
|
||||
}
|
||||
|
||||
func (sh *serviceDescription) readProfile(authtype string, id string, binfo string) (email string, err error) {
|
||||
@ -330,9 +331,12 @@ func (sh *serviceDescription) prepare(mg *Maingate) error {
|
||||
mg.apiTokenToService.add(keyid.Hex(), sh.ServiceCode)
|
||||
}
|
||||
|
||||
bt, _ := json.Marshal(sh.ServiceDescriptionSummary)
|
||||
bt, _ := json.Marshal(sh)
|
||||
atomic.StorePointer(&sh.serviceSerialized, unsafe.Pointer(&bt))
|
||||
|
||||
btsum, _ := json.Marshal(sh.ServiceDescriptionSummary)
|
||||
atomic.StorePointer(&sh.serviceSummarySerialized, unsafe.Pointer(&btsum))
|
||||
|
||||
logger.Println("service is ready :", sh.ServiceName, sh.ServiceCode, sh.UseWhitelist, sh.ApiUsers, string(divmarshaled))
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user