@@ -45,6 +45,7 @@ func (c *Client) getAppListFromData(apps []map[string]interface{}) ([]*AppInfo,
4545 var res []* AppInfo
4646 for _ , data := range apps {
4747 var appEntrances []Entrance
48+ var appSharedEntrances []Entrance
4849 appPorts := make ([]ServicePort , 0 )
4950 appACLs := make ([]ACL , 0 )
5051
@@ -150,6 +151,22 @@ func (c *Client) getAppListFromData(apps []map[string]interface{}) ([]*AppInfo,
150151 }
151152 }
152153
154+ sharedEntrances , ok := appSpec ["sharedEntrances" ]
155+ if ok {
156+ entrancesInterface := sharedEntrances .([]interface {})
157+ for _ , entranceInterface := range entrancesInterface {
158+ entranceMap := entranceInterface .(map [string ]interface {})
159+ var appEntrance Entrance
160+ if t , ok := entranceMap ["name" ]; ok {
161+ appEntrance .Name = stringOrEmpty (t )
162+ }
163+ if t , ok := entranceMap ["url" ]; ok {
164+ appEntrance .URL = stringOrEmpty (t )
165+ }
166+ appSharedEntrances = append (appSharedEntrances , appEntrance )
167+ }
168+ }
169+
153170 ports , ok := appSpec ["ports" ]
154171 if ok {
155172 portsInterface := ports .([]interface {})
@@ -224,6 +241,7 @@ func (c *Client) getAppListFromData(apps []map[string]interface{}) ([]*AppInfo,
224241 MobileSupported : mobileSupported ,
225242 RequiredGpu : requiredGPU ,
226243 DefaultThirdLevelDomainConfig : defaultThirdLevelDomainConfig ,
244+ SharedEntrances : appSharedEntrances ,
227245 })
228246
229247 }
0 commit comments