Documentation ¶
Index ¶
- Constants
- Variables
- func CheckNonce(nonce string) (int, error)
- func GenUUID(action int) string
- func InitDidService(conf *config.SysConfig) error
- func InitEmailService(mailConfig *config.EmailConfig) error
- func InitNftClaimService(cfg *config.SysConfig)
- func InitOntloginServcie() error
- func InitSysDataService(did string) error
- func ParseInputParam(paramStr string, apikey string, userAddrInfos []*store.UserAddressInfo, ...) (string, string, error)
- type AssetParam
- type DidService
- func (ds *DidService) EncryptDataWithDID(data []byte, did string) ([]byte, error)
- func (s *DidService) GetResolver(did string) (did.Resolver, error)
- func (s *DidService) IssueCredential(did string, content string, commit bool) (string, string, error)
- func (s *DidService) RevokeCredential(did string, cred string) (string, error)
- func (ds *DidService) SignData(selfdid string, data []byte) ([]byte, error)
- func (s *DidService) ValidateSig(did string, msg string, sig string) (bool, error)
- type EmailService
- type NftClaimService
- func (ns *NftClaimService) DealWithTimeoutNFT()
- func (ns *NftClaimService) DealWithTimeoutTx()
- func (ns *NftClaimService) GetNFTDetail(chain, contractAddress string, tokenid int64) (smartcontract.OrangeReputationtokenDetail, error)
- func (ns *NftClaimService) GetNFTTimeoutRecord() ([]*store.ClaimNFTRecord, error)
- func (ns *NftClaimService) GetUserClaimHash(userAddr string, nftType int, score uint64) ([]byte, error)
- func (ns *NftClaimService) MonitorTx()
- func (ns *NftClaimService) SignMsg(msghash []byte) ([]byte, error)
- func (ns *NftClaimService) UpdateClaimNftRecord(nftRecords []*store.ClaimNFTRecord) error
- type OntloginService
- type RespData
- type SysDataService
- type TaskService
- func (ts *TaskService) CreateCredential(task *store.TaskInfo) error
- func (ts *TaskService) DealWithCompositeDP(dm *store.DPMethod, task *store.TaskInfo) error
- func (ts *TaskService) DealWithSingleDP(dpdid, dpmethod string, isPOC bool, isLast bool, task *store.TaskInfo) error
- func (ts *TaskService) MonitorDPFinishedTasks()
- func (ts *TaskService) Run()
- type TheGraphService
- type Token
- type UserAssetInfo
- type UserData
Constants ¶
View Source
const ( TASK_TICKER = 10 * time.Second OSCORE_AP_METHOD = "calc30xWithDefi" )
View Source
const ClaimBatchCount = 100
View Source
const (
TheGraphDefaultTimeout = time.Second * 300
)
Variables ¶
View Source
var ( PARAM_KEY_APIKEY = "$API_KEY" PARAM_KEY_ARRAY = "$ARRAY" PARAM_KEY_CHAIN = "$CHAIN_NAME" PARAM_KEY_USERADDRESS = "$USER_ADDRESS" PARAM_KEY_ENCRYPTED = "$ENCRYPTED" PARAM_KEY_USER_DID = "$USER_DID" PARAM_DEFAULT_CHAIN_NAME = "$DEFAULT_CHAIN_NAME" PARAM_DEFAULT_USER_ADDRESS = "$DEFAULT_USER_ADDRESS" PARAM_AP_DID = "$AP_DID" )
Functions ¶
func CheckNonce ¶
func InitDidService ¶
func InitEmailService ¶
func InitEmailService(mailConfig *config.EmailConfig) error
func InitNftClaimService ¶
func InitOntloginServcie ¶
func InitOntloginServcie() error
func InitSysDataService ¶
Types ¶
type AssetParam ¶
type DidService ¶
var SysDidService *DidService
func (*DidService) EncryptDataWithDID ¶
func (ds *DidService) EncryptDataWithDID(data []byte, did string) ([]byte, error)
func (*DidService) GetResolver ¶
func (s *DidService) GetResolver(did string) (did.Resolver, error)
func (*DidService) IssueCredential ¶
func (*DidService) RevokeCredential ¶
func (s *DidService) RevokeCredential(did string, cred string) (string, error)
func (*DidService) SignData ¶
func (ds *DidService) SignData(selfdid string, data []byte) ([]byte, error)
func (*DidService) ValidateSig ¶
type EmailService ¶
type EmailService struct { //MailAddress string //SMTPPort int //Password string MailContent string MailSubject string SelfMail string Server *mail.SMTPServer }
var GlobalEmailService *EmailService
func NewEmailService ¶
func NewEmailService(mailConfig *config.EmailConfig) (*EmailService, error)
func (*EmailService) GenerateEmailVCode ¶
func (es *EmailService) GenerateEmailVCode(did, email string) string
func (*EmailService) RequestEmailVCode ¶
func (es *EmailService) RequestEmailVCode(did, email string) (string, error)
func (*EmailService) SendVerificationCode ¶
func (es *EmailService) SendVerificationCode(to string, code string) error
type NftClaimService ¶
type NftClaimService struct {
// contains filtered or unexported fields
}
var GlobalNftClaimService *NftClaimService
func NewNftClaimService ¶
func NewNftClaimService(cfg *config.SysConfig) *NftClaimService
func (*NftClaimService) DealWithTimeoutNFT ¶
func (ns *NftClaimService) DealWithTimeoutNFT()
func (*NftClaimService) DealWithTimeoutTx ¶
func (ns *NftClaimService) DealWithTimeoutTx()
func (*NftClaimService) GetNFTDetail ¶
func (ns *NftClaimService) GetNFTDetail(chain, contractAddress string, tokenid int64) (smartcontract.OrangeReputationtokenDetail, error)
func (*NftClaimService) GetNFTTimeoutRecord ¶
func (ns *NftClaimService) GetNFTTimeoutRecord() ([]*store.ClaimNFTRecord, error)
func (*NftClaimService) GetUserClaimHash ¶
func (*NftClaimService) MonitorTx ¶
func (ns *NftClaimService) MonitorTx()
func (*NftClaimService) SignMsg ¶
func (ns *NftClaimService) SignMsg(msghash []byte) ([]byte, error)
func (*NftClaimService) UpdateClaimNftRecord ¶
func (ns *NftClaimService) UpdateClaimNftRecord(nftRecords []*store.ClaimNFTRecord) error
type OntloginService ¶
type OntloginService struct {
OntloginSdk *sdk.OntLoginSdk
}
var OloginService *OntloginService
type SysDataService ¶
type SysDataService struct { SysDP *data.HttpDataProvider Apikey string Did string }
this is fixed provided by system
var SysDS *SysDataService
func NewSysDataService ¶
func NewSysDataService(did string) (*SysDataService, error)
func (*SysDataService) AnalyzeUserAssetInfoRes ¶
func (s *SysDataService) AnalyzeUserAssetInfoRes(in []byte) ([]*UserAssetInfo, error)
func (*SysDataService) GetUserAssetsDetail ¶
func (s *SysDataService) GetUserAssetsDetail(did string) ([]*UserAssetInfo, error)
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
func NewTaskService ¶
func NewTaskService() *TaskService
func (*TaskService) CreateCredential ¶
func (ts *TaskService) CreateCredential(task *store.TaskInfo) error
func (*TaskService) DealWithCompositeDP ¶
func (*TaskService) DealWithSingleDP ¶
func (*TaskService) MonitorDPFinishedTasks ¶
func (ts *TaskService) MonitorDPFinishedTasks()
func (*TaskService) Run ¶
func (ts *TaskService) Run()
type TheGraphService ¶
type TheGraphService struct {
// contains filtered or unexported fields
}
func NewTheGraphService ¶
func NewTheGraphService(cfg *config.GraphConfig) *TheGraphService
func (*TheGraphService) QueryHashByAddressFromChain ¶
func (this *TheGraphService) QueryHashByAddressFromChain(address, chain string) ([]*Token, error)
type UserAssetInfo ¶
Click to show internal directories.
Click to hide internal directories.