迁移并重构项目,优化了执行流程
This commit is contained in:
		
							
								
								
									
										33
									
								
								internal/class/SafeLine/Other.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								internal/class/SafeLine/Other.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,33 @@
 | 
			
		||||
package SafeLine
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ListResp struct {
 | 
			
		||||
	Data struct {
 | 
			
		||||
		Nodes []Nodes `json:"nodes"`
 | 
			
		||||
		Total int     `json:"total"`
 | 
			
		||||
	} `json:"data"`
 | 
			
		||||
	Err string `json:"err"`
 | 
			
		||||
	Msg string `json:"msg"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Nodes struct {
 | 
			
		||||
	Id            int       `json:"id"`
 | 
			
		||||
	Domains       []string  `json:"domains"`
 | 
			
		||||
	Issuer        string    `json:"issuer"`
 | 
			
		||||
	SelfSignature bool      `json:"self_signature"`
 | 
			
		||||
	Trusted       bool      `json:"trusted"`
 | 
			
		||||
	Revoked       bool      `json:"revoked"`
 | 
			
		||||
	Expired       bool      `json:"expired"`
 | 
			
		||||
	Type          int       `json:"type"`
 | 
			
		||||
	AcmeMessage   string    `json:"acme_message"`
 | 
			
		||||
	ValidBefore   time.Time `json:"valid_before"`
 | 
			
		||||
	RelatedSites  []string  `json:"related_sites"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (listResp *ListResp) Unmarshal(data []byte) {
 | 
			
		||||
	_ = json.Unmarshal(data, &listResp)
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user