store

package
v0.0.0-...-10d2010 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TASK_STATUS_INIT          = 0
	TASK_STATUS_RESOLVING     = 1
	TASK_STATUS_DP_QUERYING   = 2
	TASK_STATUS_DP_FINISHED   = 3
	TASK_STATUS_DP_FAILED     = 4
	TASK_STATUS_DP_TIMEOUT    = 5
	TASK_STATUS_AP_RESOLVING  = 6
	TASK_STATUS_AP_QUERYING   = 7
	TASK_STATUS_AP_FAILED     = 8
	TASK_STATUS_AP_TIMEOUT    = 9
	TASK_STATUS_AP_FINISHED   = 10
	TASK_STATUS_VC_STARTING   = 11
	TASK_STATUS_VC_GENERATING = 12
	TASK_STATUS_VC_FAILED     = 13
	TASK_STATUS_DONE          = 14

	TASK_STATUS_PARTITIAL_FINISHED = 15
	TASK_STATUS_MUTLI_DP_FINISHED  = 16

	AUTH_INFO_STATE_INIT     = 0
	AUTH_INFO_STATE_APPROVED = 1
	AUTH_INFO_STATE_REJECTED = 2

	CLAIM_NFT_STATUS_INIT      = 0
	CLAIM_NFT_STATUS_QUERYING  = 1
	CLAIM_NFT_STATUS_RESOLVING = 2
	CLAIM_NFT_STATUS_DONE      = 3
	CLAIM_NFT_STATUS_TIMEOUT   = 4

	METHOD_REMOVED   = "REMOVED"
	METHOD_PUBLISHED = "published"
	METHOD_REVOKED   = "revoking"
)
View Source
var NEW_TASK_RESOLVE_COUNT = 100

Functions

func InitMysql

func InitMysql(cfg *config.DB) error

Types

type APMethod

type APMethod struct {
	Did          string
	Method       string
	ParamSchema  string
	ResultSchema string
	URL          string
	Param        string
	Name         string
	Description  string
	Invoked      int
	Latency      int
	CreateTime   time.Time
	HttpMethod   string
	Labels       *LabelsInfo
	Status       string
}

type APMethodWithAPInfo

type APMethodWithAPInfo struct {
	Ap       *AlgorithmProvider
	ApMethod *APMethod
}

type AlgorithmProvider

type AlgorithmProvider struct {
	Did             string
	APType          int
	Name            string
	Introduction    string
	CreateTime      time.Time
	ApiKey          string
	Title           string
	Provider        string
	InvokeFrequency int
	ApiState        int
	Author          string
	Popularity      int
	Delay           int
	Icon            string
}

type ApplicationInfo

type ApplicationInfo struct {
	Did     string
	Name    string
	Website string
}

type AuthInfo

type AuthInfo struct {
	Did           string
	AppName       string
	DataAuth      string
	AlgorithmAuth string
	State         int
}

type ClaimNFTRecord

type ClaimNFTRecord struct {
	TxHash          string
	Chain           string
	ContractAddress string
	NftType         int64
	UserDID         string
	UserAddress     string
	CreateTime      time.Time
	UpdateTime      time.Time
	Status          int
	Result          string
	TokenId         int64
	Score           int64
}

type DBCon

type DBCon struct {
	Dbconnect *sqlx.DB
}
var MySqlDB *DBCon

func (*DBCon) AddAPInvokeFrenquency

func (this *DBCon) AddAPInvokeFrenquency(did string, delay int64) error

func (*DBCon) AddAPMethodInvoked

func (this *DBCon) AddAPMethodInvoked(did, method string, delay int64) error

func (*DBCon) AddFeedBack

func (db *DBCon) AddFeedBack(fb *FeedBack) error

func (*DBCon) AddNewBasicInfo

func (db *DBCon) AddNewBasicInfo(did, nickName, email, avatar string) error

func (*DBCon) AddNewClaimRecord

func (db *DBCon) AddNewClaimRecord(record *ClaimNFTRecord) error

func (*DBCon) AddNewEmailVerificationCode

func (db *DBCon) AddNewEmailVerificationCode(did, email, vcode string) error

func (*DBCon) AddTask

func (this *DBCon) AddTask(userdid, ap_did, ap_method, dp_did, dp_method, callerdid, bind_info string) (int64, error)

func (*DBCon) AddTaskHistory

func (db *DBCon) AddTaskHistory(th *TaskHistory) error

func (*DBCon) AddTaskHistoryByTaskInfo

func (db *DBCon) AddTaskHistoryByTaskInfo(taskinfo *TaskInfo) error

func (*DBCon) AddUUIDNonce

func (db *DBCon) AddUUIDNonce(uuid string, action int) error

func (*DBCon) AddUserAddressInfo

func (this *DBCon) AddUserAddressInfo(info *UserAddressInfo) error

func (*DBCon) AddUserOScoreInfo

func (this *DBCon) AddUserOScoreInfo(ai *UserOscoreInfo) error

func (*DBCon) AddWasmCode

func (this *DBCon) AddWasmCode(did, address, code, comments string) error

func (*DBCon) AppendDPResult

func (this *DBCon) AppendDPResult(taskid int64, dpresult string, isLast bool, method string) error

func (*DBCon) CancelAPInfo

func (this *DBCon) CancelAPInfo(apDID, status string) error

func (*DBCon) CancelDPInfo

func (this *DBCon) CancelDPInfo(dpDID, status string) error

func (*DBCon) ChangeTaskStatus

func (this *DBCon) ChangeTaskStatus(taskid int64, fromStatus, toStatus int) (int64, error)

func (*DBCon) CheckAPDataSetExistByAPDID

func (db *DBCon) CheckAPDataSetExistByAPDID(apDid string) (bool, error)

func (*DBCon) CheckAPDataSetMethodNameExist

func (db *DBCon) CheckAPDataSetMethodNameExist(userDId, methodName string) (*model.ApDataSetRes, error)

func (*DBCon) CheckAPDataSetNameExist

func (db *DBCon) CheckAPDataSetNameExist(userDId, dataSetName string) (*model.ApDataSetRes, error)

func (*DBCon) CheckAPIKey

func (this *DBCon) CheckAPIKey(key string) (bool, error)

func (*DBCon) CheckApNameExist

func (db *DBCon) CheckApNameExist(apName string) (*model.ApInfoRes, string, error)

func (*DBCon) CheckDPDataSetExistByDPDID

func (db *DBCon) CheckDPDataSetExistByDPDID(apDid string) (bool, error)

func (*DBCon) CheckDPDataSetMethodNameExist

func (db *DBCon) CheckDPDataSetMethodNameExist(userDId, methodName string) (*model.DpDataSetRes, error)

func (*DBCon) CheckDPDataSetNameExist

func (db *DBCon) CheckDPDataSetNameExist(userDId, dataSetName string) (*model.DpDataSetRes, error)

func (*DBCon) CheckDpNameExist

func (db *DBCon) CheckDpNameExist(dpName string) (*model.DpInfoRes, string, error)

func (*DBCon) CheckDuplicateAP

func (this *DBCon) CheckDuplicateAP(apDataSetList []*model.ApDataSetRes, apDataSet *model.ApDataSetInfo) (bool, error)

func (*DBCon) CheckDuplicateAPDataSetName

func (this *DBCon) CheckDuplicateAPDataSetName(apDataSet *model.ApDataSetInfo, userDid string) (bool, error)

func (*DBCon) CheckDuplicateDP

func (this *DBCon) CheckDuplicateDP(dpDataSetList []*model.DpDataSetRes, dpDataSet *model.DpDataSetInfo) (bool, error)

func (*DBCon) CheckDuplicateDPDataSetName

func (this *DBCon) CheckDuplicateDPDataSetName(dpDataSet *model.DpDataSetInfo, userDid string) (bool, error)

func (*DBCon) CheckProviderMethodMatch

func (db *DBCon) CheckProviderMethodMatch(apdid, apmethod, dpdid, dpmethod string) (bool, error)

func (*DBCon) DeleteAPDataSet

func (this *DBCon) DeleteAPDataSet(userDid string, dataSetID int64) (bool, error)

func (*DBCon) DeleteDPDataSet

func (this *DBCon) DeleteDPDataSet(userDid string, dataSetID int64) (bool, error)

func (*DBCon) DeleteTask

func (this *DBCon) DeleteTask(userdid, ap_did, ap_method, dp_did, dp_method string) error

func (*DBCon) DeleteTaskById

func (this *DBCon) DeleteTaskById(taskid int64) error

func (*DBCon) DeleteUserAddressInfo

func (this *DBCon) DeleteUserAddressInfo(did, chain, address string) error

func (*DBCon) EditAppNameAppInfo

func (db *DBCon) EditAppNameAppInfo(did, appName string) error

func (*DBCon) EditEmailAddrBasicInfo

func (db *DBCon) EditEmailAddrBasicInfo(did, email, verifyCode string) error

func (*DBCon) EditNickNameBasicInfo

func (db *DBCon) EditNickNameBasicInfo(did, nickName string) error

func (*DBCon) EditWebsiteAppInfo

func (db *DBCon) EditWebsiteAppInfo(did, website string) error

func (*DBCon) GetAPPopularity

func (this *DBCon) GetAPPopularity(did string) (int64, error)

func (*DBCon) GetAllApInfo

func (this *DBCon) GetAllApInfo() ([]*model.MethodInfo, error)

func (*DBCon) GetAllTaskHistoryCount

func (this *DBCon) GetAllTaskHistoryCount() (int64, error)

func (*DBCon) GetCompositeDpInfo

func (this *DBCon) GetCompositeDpInfo(did, method string) ([]*model.MethodInfo, error)

func (*DBCon) GetDPMethodInfo

func (this *DBCon) GetDPMethodInfo(did, method string) ([]*model.MethodDetail, error)

func (*DBCon) GetDPPopularity

func (this *DBCon) GetDPPopularity(did string) (int64, error)

func (*DBCon) GetDataSetLabels

func (db *DBCon) GetDataSetLabels(labelType string) (*model.LabelsInfos, error)

func (*DBCon) GetEmailVerificationCode

func (db *DBCon) GetEmailVerificationCode(did, email string) (string, error)

func (*DBCon) GetGenNFTCountByDID

func (db *DBCon) GetGenNFTCountByDID(did string) (int64, error)

func (*DBCon) GetInQueryTaskCount

func (this *DBCon) GetInQueryTaskCount() (int64, error)

func (*DBCon) GetNFTSettingByCondition

func (db *DBCon) GetNFTSettingByCondition(where string) ([]*NFTSetting, error)

func (*DBCon) GetNFTSettingCountByCondition

func (db *DBCon) GetNFTSettingCountByCondition(where string) (int64, error)

func (*DBCon) GetParamSchema

func (this *DBCon) GetParamSchema(did, method string) (string, error)

func (*DBCon) GetThirdPartyVCCounts

func (db *DBCon) GetThirdPartyVCCounts(did string) (int64, error)

func (*DBCon) GetTimeOutTasks

func (this *DBCon) GetTimeOutTasks() ([]*TaskInfo, error)

func (*DBCon) GetUserAddressInfo

func (this *DBCon) GetUserAddressInfo(did string) ([]*UserAddressInfo, error)

func (*DBCon) GetUserAddressInfoCount

func (this *DBCon) GetUserAddressInfoCount(did string) (int64, error)

func (*DBCon) GetUserBasicInfo

func (db *DBCon) GetUserBasicInfo(did string) (*UserBasicInfo, error)

func (*DBCon) GetUserCredentialsByCondition

func (this *DBCon) GetUserCredentialsByCondition(strWhere string) ([]*TaskInfo, error)

func (*DBCon) GetUserCredentialsCountByCondition

func (this *DBCon) GetUserCredentialsCountByCondition(strWhere string) (int64, error)

func (*DBCon) GetUserReputationCount

func (this *DBCon) GetUserReputationCount(did string) (int64, error)

func (*DBCon) GetUserVisibleAddressInfo

func (this *DBCon) GetUserVisibleAddressInfo(did string) ([]*UserAddressInfo, error)

func (*DBCon) IsUserBindLoginAddress

func (this *DBCon) IsUserBindLoginAddress(did string, addr string) (bool, error)

func (*DBCon) LockTaskStatus

func (this *DBCon) LockTaskStatus(fromStatus, toStatus int, count int64) (int64, error)

func (*DBCon) QueryAPDataSetInfo

func (this *DBCon) QueryAPDataSetInfo(userDid string, dataSetID int64) (*model.ApDataSetRes, error)

func (*DBCon) QueryAPDatatSetCountByCondition

func (this *DBCon) QueryAPDatatSetCountByCondition(userDId string) (int64, error)

func (*DBCon) QueryAPInfo

func (this *DBCon) QueryAPInfo(userDID, status string) (*model.ApInfoRes, error)

func (*DBCon) QueryAPMethodByDIDAndMethod

func (this *DBCon) QueryAPMethodByDIDAndMethod(did, method string) (*APMethod, error)

func (*DBCon) QueryAlgorithmProviderByDid

func (this *DBCon) QueryAlgorithmProviderByDid(did string) (*AlgorithmProvider, error)

func (*DBCon) QueryAlgorithmProviderMethodByDid

func (this *DBCon) QueryAlgorithmProviderMethodByDid(did string) ([]*APMethod, error)

func (*DBCon) QueryAlgorithmProviderTitle

func (this *DBCon) QueryAlgorithmProviderTitle(title string) (*AlgorithmProvider, error)

func (*DBCon) QueryAllAlgorithmProviderMethodsByCondition

func (this *DBCon) QueryAllAlgorithmProviderMethodsByCondition(where string) ([]*APMethodWithAPInfo, error)

func (*DBCon) QueryAllAlgorithmProviderMethodsCountByCondition

func (this *DBCon) QueryAllAlgorithmProviderMethodsCountByCondition(where string) (int64, error)

func (*DBCon) QueryAllAlgorithmProviders

func (this *DBCon) QueryAllAlgorithmProviders() ([]*AlgorithmProvider, error)

func (*DBCon) QueryAllAlgorithmProvidersByCondition

func (this *DBCon) QueryAllAlgorithmProvidersByCondition(where string) ([]*AlgorithmProvider, error)

func (*DBCon) QueryAllAlgorithmProvidersCountByCondition

func (this *DBCon) QueryAllAlgorithmProvidersCountByCondition(where string) (int64, error)

func (*DBCon) QueryAllDPMethodByCondition

func (this *DBCon) QueryAllDPMethodByCondition(where string) ([]*DPMethodWithDPInfo, error)

func (*DBCon) QueryAllDPMethodCountByCondition

func (this *DBCon) QueryAllDPMethodCountByCondition(where string) (int64, error)

func (*DBCon) QueryAllDataProviders

func (this *DBCon) QueryAllDataProviders() ([]*DataProvider, error)

func (*DBCon) QueryAllDataProvidersByCondition

func (this *DBCon) QueryAllDataProvidersByCondition(where string) ([]*DataProvider, error)

func (*DBCon) QueryAllDataProvidersCountByCondition

func (this *DBCon) QueryAllDataProvidersCountByCondition(where string) (int64, error)

func (*DBCon) QueryAllThirdPartyVcStatus

func (db *DBCon) QueryAllThirdPartyVcStatus(did string) ([]*model.ThirdPartyVcStatus, error)

func (*DBCon) QueryApplicationInfo

func (db *DBCon) QueryApplicationInfo(did string) (*ApplicationInfo, error)

func (*DBCon) QueryAuthInfoByDid

func (db *DBCon) QueryAuthInfoByDid(did string) (*AuthInfo, error)

func (*DBCon) QueryClaimRecordCountByCondition

func (db *DBCon) QueryClaimRecordCountByCondition(where string) (int64, error)

func (*DBCon) QueryClaimRecordCountByStatus

func (db *DBCon) QueryClaimRecordCountByStatus(status int) (int64, error)

func (*DBCon) QueryClaimRecordsByCondition

func (db *DBCon) QueryClaimRecordsByCondition(where string) ([]*ClaimNFTRecord, error)

func (*DBCon) QueryClaimRecordsByStatus

func (db *DBCon) QueryClaimRecordsByStatus(status int) ([]*ClaimNFTRecord, error)

func (*DBCon) QueryDPAndMethodsByAP

func (this *DBCon) QueryDPAndMethodsByAP(apdid, apMethod string) ([]*DataProvider, []*DPMethod, error)

func (*DBCon) QueryDPDataSetInfo

func (this *DBCon) QueryDPDataSetInfo(userDid string, dataSetID int64) (*model.DpDataSetRes, error)

func (*DBCon) QueryDPDatatSetCountByCondition

func (this *DBCon) QueryDPDatatSetCountByCondition(userDId string) (int64, error)

func (*DBCon) QueryDPInfo

func (this *DBCon) QueryDPInfo(userDID, status string) (*model.DpInfoRes, error)

func (*DBCon) QueryDPMethodByDIDAndMethod

func (this *DBCon) QueryDPMethodByDIDAndMethod(did, method string) (*DPMethod, error)

func (*DBCon) QueryDataProviderByDid

func (this *DBCon) QueryDataProviderByDid(did string) (*DataProvider, error)

func (*DBCon) QueryDataProviderMethodByDid

func (this *DBCon) QueryDataProviderMethodByDid(did string) ([]*DPMethod, error)

func (*DBCon) QueryDataProviderTitle

func (this *DBCon) QueryDataProviderTitle(title string) (*DataProvider, error)

func (*DBCon) QuerySnapShotAssetsScore

func (this *DBCon) QuerySnapShotAssetsScore(address string) (string, error)

func (*DBCon) QueryTaskByPK

func (this *DBCon) QueryTaskByPK(taskid int64) (*TaskInfo, error)

func (*DBCon) QueryTaskByStatus

func (this *DBCon) QueryTaskByStatus(status int) ([]*TaskInfo, error)

func (*DBCon) QueryTaskByUniqueKey

func (this *DBCon) QueryTaskByUniqueKey(userdid, ap_did, ap_method, dp_did, dp_method string) (*TaskInfo, error)

func (*DBCon) QueryTaskHistoryByUserDID

func (db *DBCon) QueryTaskHistoryByUserDID(userdid string) ([]*TaskHistory, error)

func (*DBCon) QueryTaskHistoryCountByUserDID

func (db *DBCon) QueryTaskHistoryCountByUserDID(did string) (int64, error)

func (*DBCon) QueryTaskInfo

func (this *DBCon) QueryTaskInfo(userdid, dp_did, dp_method string) (*TaskInfo, error)

func (*DBCon) QueryTasksByUserDID

func (this *DBCon) QueryTasksByUserDID(userdid string) ([]*TaskInfo, error)

func (*DBCon) QueryThirdPartyVc

func (db *DBCon) QueryThirdPartyVc(did, mediaType string) (string, error)

func (*DBCon) QueryUUIDAction

func (db *DBCon) QueryUUIDAction(uuid string) (int, error)

func (*DBCon) QueryUserAP

func (db *DBCon) QueryUserAP(userDID string) (*model.ApInfoRes, error)

func (*DBCon) QueryUserAPDataSetList

func (this *DBCon) QueryUserAPDataSetList(userDID, status string) ([]*model.ApDataSetRes, error)

func (*DBCon) QueryUserAPDataSetLists

func (this *DBCon) QueryUserAPDataSetLists(userDID, dataSetName, status string, page int64, size int64, labels model.LabelsInfo) (*model.APDataSetList, error)

func (*DBCon) QueryUserDIDByAPDID

func (this *DBCon) QueryUserDIDByAPDID(apDID, status string) (string, error)

func (*DBCon) QueryUserDIDByDPDID

func (this *DBCon) QueryUserDIDByDPDID(dpDID, status string) (string, error)

func (*DBCon) QueryUserDP

func (db *DBCon) QueryUserDP(userDID string) (*model.DpInfoRes, error)

func (*DBCon) QueryUserDPDataSetList

func (this *DBCon) QueryUserDPDataSetList(userDID, status string) ([]*model.DpDataSetRes, error)

func (*DBCon) QueryUserDPDataSetLists

func (this *DBCon) QueryUserDPDataSetLists(userDID, dataSetName, status string, page int64, size int64, labels model.LabelsInfo) (*model.DPDataSetList, error)

func (*DBCon) QueryUserKycInfo

func (db *DBCon) QueryUserKycInfo(did string) (string, error)

func (*DBCon) QueryUserLatestOScoreInfo

func (this *DBCon) QueryUserLatestOScoreInfo(did string) (*UserOscoreInfo, error)

func (*DBCon) QueryWasmCodeByDIDAndAddress

func (this *DBCon) QueryWasmCodeByDIDAndAddress(did, address string) (*WasmCodeInfo, error)

func (*DBCon) ResetTimeOutTasks

func (this *DBCon) ResetTimeOutTasks(cnt int) error

func (*DBCon) RevokeAPDataSet

func (this *DBCon) RevokeAPDataSet(userDid, afterStatus, beforeStatus string, dataSetID int64) (bool, error)

func (*DBCon) RevokeAPInfo

func (this *DBCon) RevokeAPInfo(userDID, afterStatus, beforeStatus string, apInfoID int64) (bool, error)

func (*DBCon) RevokeDPDataSet

func (this *DBCon) RevokeDPDataSet(userDid, afterStatus, beforeStatus string, dataSetID int64) (bool, error)

func (*DBCon) RevokeDPInfo

func (this *DBCon) RevokeDPInfo(userDID, afterStatus, beforeStatus string, dpInfoID int64) (bool, error)

func (*DBCon) RevokePublishedAPDataSet

func (this *DBCon) RevokePublishedAPDataSet(userDid string, dataSetID int64) (bool, error)

func (*DBCon) RevokePublishedDPDataSet

func (this *DBCon) RevokePublishedDPDataSet(userDid string, dataSetID int64) (bool, error)

func (*DBCon) SaveAPInfo

func (db *DBCon) SaveAPInfo(userDID string, apInfo *model.SubmitApInfo) (bool, error)

func (*DBCon) SaveApplicationInfo

func (db *DBCon) SaveApplicationInfo(did, name, website string) error

func (*DBCon) SaveDPInfo

func (db *DBCon) SaveDPInfo(userDID string, dpInfo *model.SubmitDpInfo) (bool, error)

func (*DBCon) SaveThirdPartyVc

func (db *DBCon) SaveThirdPartyVc(did, mediaType, credential string) error

func (*DBCon) SaveUserKycInfo

func (db *DBCon) SaveUserKycInfo(did, kyc string) error

func (*DBCon) SetAPResult

func (this *DBCon) SetAPResult(taskid int64, apresult string) error

func (*DBCon) SetAPResultFailed

func (this *DBCon) SetAPResultFailed(taskid int64, apresult string) error

func (*DBCon) SetAddressVisible

func (this *DBCon) SetAddressVisible(userDid, chain, address string, visible bool) error

func (*DBCon) SetClaimRecordResultByPK

func (db *DBCon) SetClaimRecordResultByPK(fromStatus, toStatus int, txhash string, chain string, result string, tokenId int64) (int64, error)

func (*DBCon) SetDPResult

func (this *DBCon) SetDPResult(taskid int64, dpresult string) error

func (*DBCon) SetDPResultFailed

func (this *DBCon) SetDPResultFailed(taskid int64, dpresult string) error

func (*DBCon) SetTaskComments

func (this *DBCon) SetTaskComments(taskid int64, comments string) error

func (*DBCon) SetTaskCredFileAndTxhash

func (this *DBCon) SetTaskCredFileAndTxhash(taskid int64, credfile string, txhash string) error

func (*DBCon) SubmitAPDataSet

func (this *DBCon) SubmitAPDataSet(apDataSet *model.ApDataSetInfo, userDid, status string) (bool, error)

func (*DBCon) SubmitAPInfo

func (db *DBCon) SubmitAPInfo(userDID string, apInfo *model.SubmitApInfo) (bool, error)

func (*DBCon) SubmitDPDataSet

func (this *DBCon) SubmitDPDataSet(dpDataSet *model.DpDataSetInfo, userDid, status string) (bool, error)

func (*DBCon) SubmitDPInfo

func (db *DBCon) SubmitDPInfo(userDID string, dpInfo *model.SubmitDpInfo) (bool, error)

func (*DBCon) UnBindThirdParty

func (db *DBCon) UnBindThirdParty(did, mediaType string) error

func (*DBCon) UpdateAPDataSetSchema

func (this *DBCon) UpdateAPDataSetSchema(apDid, dataSetName, inputSchema, outputSchema string) (bool, error)

func (*DBCon) UpdateAPDataSetStatus

func (this *DBCon) UpdateAPDataSetStatus(userDid, afterStatus, beforeStatus string, dataSetID int64) (bool, error)

func (*DBCon) UpdateApInfo

func (this *DBCon) UpdateApInfo(apInfo *model.SubmitApInfo) (bool, error)

func (*DBCon) UpdateBasicInfo

func (db *DBCon) UpdateBasicInfo(did, nickName, email string) error

func (*DBCon) UpdateClaimRecordResult

func (db *DBCon) UpdateClaimRecordResult(fromStatus, toStatus int, txhash string, chain string, result string, nftType, tokenId int64, oldTxHash string) (int64, error)

func (*DBCon) UpdateClaimRecordStatusByLimit

func (db *DBCon) UpdateClaimRecordStatusByLimit(fromStatus, toStatus, limit int) (int64, error)

func (*DBCon) UpdateClaimRecordStatusByPK

func (db *DBCon) UpdateClaimRecordStatusByPK(fromStatus, toStatus int, txhash string, chain string) (int64, error)

func (*DBCon) UpdateDPDataSetSchema

func (this *DBCon) UpdateDPDataSetSchema(dpDid, dataSetName, inputSchema, outputSchema string) (bool, error)

func (*DBCon) UpdateDPDataSetStatus

func (this *DBCon) UpdateDPDataSetStatus(userDid, afterStatus, beforeStatus string, dataSetID int64) (bool, error)

func (*DBCon) UpdateDPMethodInvoked

func (this *DBCon) UpdateDPMethodInvoked(did, method string, latency int64) error

func (*DBCon) UpdateDPMethodLatency

func (this *DBCon) UpdateDPMethodLatency(did string, latency int64) error

func (*DBCon) UpdateDPMethodStatus

func (this *DBCon) UpdateDPMethodStatus(did, method, status string) error

func (*DBCon) UpdateEmailVerificationCode

func (db *DBCon) UpdateEmailVerificationCode(did, email, newcode string) error

func (*DBCon) UpdateTaskHistoryByTaskInfo

func (db *DBCon) UpdateTaskHistoryByTaskInfo(taskinfo *TaskInfo) error

func (*DBCon) UpdateTaskHistoryTxhash

func (db *DBCon) UpdateTaskHistoryTxhash(taskid int64, txhash string) error

func (*DBCon) UpdateUserLatestOscore

func (this *DBCon) UpdateUserLatestOscore(ai *UserOscoreInfo) error

type DPMethod

type DPMethod struct {
	Did              string
	Method           string
	ParamSchema      string
	ResultSchema     string
	URL              string
	CompositeSetting string
	Param            string
	Name             string
	Description      string
	Invoked          int
	Latency          int
	CreateTime       time.Time
	Labels           *LabelsInfo
	HttpMethod       string
	Status           string
}

type DPMethodWithDPInfo

type DPMethodWithDPInfo struct {
	Dp       *DataProvider
	DpMethod *DPMethod
}

type DataProvider

type DataProvider struct {
	Did             string
	Introduction    string
	CreateTime      time.Time
	DpType          int
	Name            string
	Apikey          string
	Title           string
	Provider        string
	InvokeFrequency int
	ApiState        int
	Author          string
	Popularity      int
	Delay           int
	Icon            string
}

type FeedBack

type FeedBack struct {
	UserDID    string
	Email      string
	Title      string
	Content    string
	CreateTime time.Time
}

type GenNFT

type GenNFT struct {
	Chain           string
	ContractAddress string
	Name            string
	Description     string
	TokenID         string
	UserDID         string
	WalletAddress   string
	CreateTime      time.Time
}

type LabelsInfo

type LabelsInfo struct {
	BlockChain string `json:"blockChain"`
	Category   string `json:"category"`
	Scenario   string `json:"scenario"`
}

type NFTSetting

type NFTSetting struct {
	Id          int
	Name        string
	Description string
	Image       string
	DpDID       string
	DpMethod    string
	ApDID       string
	ApMethod    string
	LowestScore int
	ValidDays   int
	Restriction string
	IssueBy     string
	AltImage    string
}

type TaskHistory

type TaskHistory struct {
	TaskId       int64
	UserDID      string
	ApDID        string
	ApMethod     string
	DpDID        string
	DpMethod     string
	CreateTime   time.Time
	UpdateTime   time.Time
	TaskStatus   int
	TaskResult   string
	IssueTxhash  string
	RevokeTxhash string
	// contains filtered or unexported fields
}

type TaskInfo

type TaskInfo struct {
	TaskId       int64
	UserDID      string
	ApDID        string
	ApName       string
	ApTitle      string
	ApIcon       string
	ApMethod     string
	APMethodName string
	DpDID        string
	DpName       string
	DpTitle      string
	DpIcon       string
	DpMethod     string
	DpMethodName string
	DpResult     string
	CreateTime   time.Time
	UpdateTime   time.Time
	TaskStatus   int
	TaskResult   string
	ResultFile   string
	IssueTxhash  string
	RevokeTxhash string
	CallerDid    string
	Comments     string
	TaskBindInfo string
}

type ThirdPartyCredential

type ThirdPartyCredential struct {
	Did        string `json:"did"`
	MediaType  string `json:"media_type"`
	Credential string `json:"credential"`
}

MediaType: BrightID Twitter ShuftiPro Github Linkedin Facebook Line Amazon Kakao

type UserAddressInfo

type UserAddressInfo struct {
	Did        string
	Chain      string
	Address    string
	Pubkey     string
	CreateTime time.Time
	Visible    bool
}

type UserBasicInfo

type UserBasicInfo struct {
	Did        string
	NickName   string
	Avatar     string
	Email      string
	CreateTime time.Time
	UpdateTime time.Time
}

type UserOscoreInfo

type UserOscoreInfo struct {
	Did        string
	Oscore     int
	ApDid      string
	DpDid      string
	CreateTime time.Time
}

type WasmCodeInfo

type WasmCodeInfo struct {
	OwnerDID   string
	Address    string
	Code       string
	CreateTime time.Time
	Comments   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL