Documentation
¶
Index ¶
- Constants
- func CheckComplianceInfo(t *testing.T, expected types.ComplianceInfo, received types.ComplianceInfo)
- func DefaultCertifiedModel() types.ComplianceInfo
- func DefaultRevokedModel() types.ComplianceInfo
- func NewQuerier(keeper Keeper) sdk.Querier
- func PopulateStoreWithMixedModels(setup TestSetup, count int) uint16
- func PopulateStoreWithModels(setup TestSetup, firstID uint16, count int, ...) uint16
- type Keeper
- func (k Keeper) CountTotalComplianceInfo(ctx sdk.Context, certificationType types.CertificationType) int
- func (k Keeper) GetComplianceInfo(ctx sdk.Context, certificationType types.CertificationType, vid uint16, ...) types.ComplianceInfo
- func (k Keeper) IsComplianceInfoPresent(ctx sdk.Context, certificationType types.CertificationType, vid uint16, ...) bool
- func (k Keeper) IterateComplianceInfos(ctx sdk.Context, certificationType types.CertificationType, ...)
- func (k Keeper) SetComplianceInfo(ctx sdk.Context, model types.ComplianceInfo)
- type TestSetup
Constants ¶
View Source
const ( QueryComplianceInfo = "compliance_info" QueryAllComplianceInfoRecords = "all_compliance_info_records" QueryCertifiedModel = "certified_model" QueryAllCertifiedModels = "all_certified_models" QueryRevokedModel = "revoked_model" QueryAllRevokedModels = "all_revoked_models" )
Variables ¶
This section is empty.
Functions ¶
func CheckComplianceInfo ¶
func CheckComplianceInfo(t *testing.T, expected types.ComplianceInfo, received types.ComplianceInfo)
func DefaultCertifiedModel ¶
func DefaultCertifiedModel() types.ComplianceInfo
func DefaultRevokedModel ¶
func DefaultRevokedModel() types.ComplianceInfo
func NewQuerier ¶
func PopulateStoreWithMixedModels ¶
add n=count/2 certified and count-n revoked models {VID: 1, PID: 1..count}.
func PopulateStoreWithModels ¶
func PopulateStoreWithModels(setup TestSetup, firstID uint16, count int, complianceInfo types.ComplianceInfo) uint16
add n models {VID: 1, PID: 1..count}.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) CountTotalComplianceInfo ¶
func (Keeper) GetComplianceInfo ¶
func (k Keeper) GetComplianceInfo(ctx sdk.Context, certificationType types.CertificationType, vid uint16, pid uint16, softwareVersion uint32) types.ComplianceInfo
Gets the entire ComplianceInfo struct for a ComplianceInfoID.
func (Keeper) IsComplianceInfoPresent ¶
func (k Keeper) IsComplianceInfoPresent(ctx sdk.Context, certificationType types.CertificationType, vid uint16, pid uint16, softwareVersion uint32) bool
Check if the ComplianceInfo is present in the store or not.
func (Keeper) IterateComplianceInfos ¶
func (k Keeper) IterateComplianceInfos(ctx sdk.Context, certificationType types.CertificationType, process func(info types.ComplianceInfo) (stop bool))
Iterate over all ComplianceInfos.
func (Keeper) SetComplianceInfo ¶
func (k Keeper) SetComplianceInfo(ctx sdk.Context, model types.ComplianceInfo)
Sets the entire ComplianceInfo metadata struct for a ComplianceInfoID.
Click to show internal directories.
Click to hide internal directories.