You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

BlockChain.go 909 B

11 months ago
11 months ago
11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
1234567891011121314151617181920212223242526272829303132
  1. package remoteUtil
  2. import (
  3. "fmt"
  4. "github.com/go-resty/resty/v2"
  5. )
  6. type EvidenceParam struct {
  7. Url string `json:"url"`
  8. Type string `json:"type"`
  9. MemberName string `json:"memberName"`
  10. ContractAddress string `json:"contractAddress"`
  11. FunctionName string `json:"functionName"`
  12. Args []string `json:"args"`
  13. Token string `json:"token"`
  14. UserIp string `json:"userIp"`
  15. Amount int64 `json:"amount"`
  16. }
  17. func Evidence(EvidenceParam EvidenceParam) error {
  18. fmt.Println("输出的user ip为:" + EvidenceParam.UserIp)
  19. httpClient := resty.New().R()
  20. _, err := httpClient.SetHeader("Content-Type", "application/json").
  21. SetHeader("X-Forwarded-For", EvidenceParam.UserIp).
  22. SetHeader("Authorization", EvidenceParam.Token).
  23. SetBody(&EvidenceParam).
  24. Post(EvidenceParam.Url)
  25. if err != nil {
  26. return err
  27. }
  28. return nil
  29. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.