mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			611 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			611 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package models
 | 
						|
 | 
						|
import (
 | 
						|
	"encoding/json"
 | 
						|
	"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
 | 
						|
)
 | 
						|
 | 
						|
func (this *ReportNode) DecodeAllowIPs() []string {
 | 
						|
	var result = []string{}
 | 
						|
	if len(this.AllowIPs) > 0 {
 | 
						|
		err := json.Unmarshal(this.AllowIPs, &result)
 | 
						|
		if err != nil {
 | 
						|
			remotelogs.Error("ReportNode.DecodeGroupIds", err.Error())
 | 
						|
		}
 | 
						|
	}
 | 
						|
	return result
 | 
						|
}
 | 
						|
 | 
						|
func (this *ReportNode) DecodeGroupIds() []int64 {
 | 
						|
	var result = []int64{}
 | 
						|
	if len(this.GroupIds) > 0 {
 | 
						|
		err := json.Unmarshal(this.GroupIds, &result)
 | 
						|
		if err != nil {
 | 
						|
			remotelogs.Error("ReportNode.DecodeGroupIds", err.Error())
 | 
						|
		}
 | 
						|
	}
 | 
						|
	return result
 | 
						|
}
 |