keeper

package
v0.2.3-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: AGPL-3.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func RegisterCrossApps added in v0.0.9

func RegisterCrossApps(keeper Keeper)

Types

type BucketApp added in v0.0.9

type BucketApp struct {
	// contains filtered or unexported fields
}

func NewBucketApp added in v0.0.9

func NewBucketApp(keeper Keeper) *BucketApp

func (*BucketApp) ExecuteAckPackage added in v0.0.9

func (app *BucketApp) ExecuteAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*BucketApp) ExecuteFailAckPackage added in v0.0.9

func (app *BucketApp) ExecuteFailAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*BucketApp) ExecuteSynPackage added in v0.0.9

func (app *BucketApp) ExecuteSynPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

type CancelCreateObjectOptions added in v0.0.7

type CancelCreateObjectOptions struct {
	SourceType types.SourceType
}

type CopyObjectOptions added in v0.0.7

type CopyObjectOptions struct {
	SourceType        types.SourceType
	Visibility        types.VisibilityType
	PrimarySpApproval *common.Approval
	ApprovalMsgBytes  []byte
}

type CreateBucketOptions added in v0.0.7

type CreateBucketOptions struct {
	Visibility        types.VisibilityType
	SourceType        types.SourceType
	ChargedReadQuota  uint64
	PaymentAddress    string
	PrimarySpApproval *common.Approval
	ApprovalMsgBytes  []byte
}

type CreateGroupOptions added in v0.0.7

type CreateGroupOptions struct {
	Members    []string
	SourceType types.SourceType
	Extra      string
}

type CreateObjectOptions added in v0.0.7

type CreateObjectOptions struct {
	Visibility        types.VisibilityType
	ContentType       string
	SourceType        types.SourceType
	RedundancyType    types.RedundancyType
	Checksums         [][]byte
	PrimarySpApproval *common.Approval
	ApprovalMsgBytes  []byte
}

type DeleteBucketOptions added in v0.0.7

type DeleteBucketOptions struct {
	SourceType types.SourceType
}

type DeleteGroupOptions added in v0.0.7

type DeleteGroupOptions struct {
	SourceType types.SourceType
}

type DeleteObjectOptions added in v0.0.7

type DeleteObjectOptions struct {
	SourceType types.SourceType
}

type GroupApp added in v0.0.9

type GroupApp struct {
	// contains filtered or unexported fields
}

func NewGroupApp added in v0.0.9

func NewGroupApp(keeper Keeper) *GroupApp

func (*GroupApp) ExecuteAckPackage added in v0.0.9

func (app *GroupApp) ExecuteAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*GroupApp) ExecuteFailAckPackage added in v0.0.9

func (app *GroupApp) ExecuteFailAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*GroupApp) ExecuteSynPackage added in v0.0.9

func (app *GroupApp) ExecuteSynPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	tStoreKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	spKeeper types.SpKeeper,
	paymentKeeper types.PaymentKeeper,
	permKeeper types.PermissionKeeper,
	crossChainKeeper types.CrossChainKeeper,
	virtualGroupKeeper types.VirtualGroupKeeper,
	authority string,
) *Keeper

func (Keeper) AppendDiscontinueObjectIds added in v0.1.2

func (k Keeper) AppendDiscontinueObjectIds(ctx sdk.Context, timestamp int64, objectIds []types.Uint)

func (Keeper) ApplyBillChanges added in v0.2.3

func (k Keeper) ApplyBillChanges(ctx sdk.Context, prevFlows, currentFlows types.UserFlows) error

func (Keeper) CancelBucketMigration added in v0.2.3

func (k Keeper) CancelBucketMigration(ctx sdk.Context, operator sdk.AccAddress, bucketName string) error

func (Keeper) CancelCreateObject added in v0.0.7

func (k Keeper) CancelCreateObject(
	ctx sdk.Context, operator sdk.AccAddress,
	bucketName, objectName string, opts CancelCreateObjectOptions) error

func (Keeper) ChargeBucketReadFee added in v0.2.3

func (k Keeper) ChargeBucketReadFee(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) error

func (Keeper) ChargeBucketReadStoreFee added in v0.2.3

func (k Keeper) ChargeBucketReadStoreFee(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) error

func (Keeper) ChargeObjectStoreFee added in v0.2.3

func (k Keeper) ChargeObjectStoreFee(ctx sdk.Context, primarySpId uint32, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, objectInfo *storagetypes.ObjectInfo) error

func (Keeper) ChargeObjectStoreFeeForEarlyDeletion added in v0.2.3

func (k Keeper) ChargeObjectStoreFeeForEarlyDeletion(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, objectInfo *storagetypes.ObjectInfo,
	chargeSize uint64, timeToPay int64) error

func (Keeper) ChargeViaBucketChange added in v0.0.7

func (k Keeper) ChargeViaBucketChange(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo,
	changeFunc func(bi *storagetypes.BucketInfo, ibi *storagetypes.InternalBucketInfo) error) error

func (Keeper) ChargeViaObjectChange added in v0.2.3

func (k Keeper) ChargeViaObjectChange(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, objectInfo *storagetypes.ObjectInfo, chargeSize uint64, delete bool) error

func (Keeper) ClearDiscontinueBucketCount added in v0.1.2

func (k Keeper) ClearDiscontinueBucketCount(ctx sdk.Context)

func (Keeper) ClearDiscontinueObjectCount added in v0.1.2

func (k Keeper) ClearDiscontinueObjectCount(ctx sdk.Context)

func (Keeper) CompleteMigrateBucket added in v0.2.3

func (k Keeper) CompleteMigrateBucket(ctx sdk.Context, operator sdk.AccAddress, bucketName string, gvgFamilyID uint32, gvgMappings []*types.GVGMapping) error

func (Keeper) CopyObject added in v0.0.7

func (k Keeper) CopyObject(
	ctx sdk.Context, operator sdk.AccAddress, srcBucketName, srcObjectName, dstBucketName, dstObjectName string,
	opts CopyObjectOptions) (sdkmath.Uint, error)

func (Keeper) CreateBucket

func (k Keeper) CreateBucket(
	ctx sdk.Context, ownerAcc sdk.AccAddress, bucketName string,
	primarySpAcc sdk.AccAddress, opts *CreateBucketOptions) (sdkmath.Uint, error)

func (Keeper) CreateGroup

func (k Keeper) CreateGroup(
	ctx sdk.Context, owner sdk.AccAddress,
	groupName string, opts CreateGroupOptions) (sdkmath.Uint, error)

func (Keeper) CreateObject

func (k Keeper) CreateObject(
	ctx sdk.Context, operator sdk.AccAddress, bucketName, objectName string,
	payloadSize uint64, opts CreateObjectOptions) (sdkmath.Uint, error)

func (Keeper) DeleteBucket

func (k Keeper) DeleteBucket(ctx sdk.Context, operator sdk.AccAddress, bucketName string, opts DeleteBucketOptions) error

func (Keeper) DeleteDiscontinueBucketsUntil added in v0.1.2

func (k Keeper) DeleteDiscontinueBucketsUntil(ctx sdk.Context, timestamp int64, maxToDelete uint64) (uint64, error)

func (Keeper) DeleteDiscontinueObjectsUntil added in v0.1.2

func (k Keeper) DeleteDiscontinueObjectsUntil(ctx sdk.Context, timestamp int64, maxObjectsToDelete uint64) (deleted uint64, err error)

func (Keeper) DeleteGroup

func (k Keeper) DeleteGroup(ctx sdk.Context, operator sdk.AccAddress, groupName string, opts DeleteGroupOptions) error

func (Keeper) DeleteMigrationBucketInfo added in v0.2.3

func (k Keeper) DeleteMigrationBucketInfo(ctx sdk.Context, bucketID sdkmath.Uint)

func (Keeper) DeleteObject

func (k Keeper) DeleteObject(
	ctx sdk.Context, operator sdk.AccAddress, bucketName, objectName string, opts DeleteObjectOptions) error

func (Keeper) DeleteObjectFromVirtualGroup added in v0.2.3

func (k Keeper) DeleteObjectFromVirtualGroup(ctx sdk.Context, bucketInfo *types.BucketInfo, objectInfo *types.ObjectInfo) error

func (Keeper) DeletePolicy added in v0.0.7

func (k Keeper) DeletePolicy(ctx sdk.Context, operator sdk.AccAddress, principal *permtypes.Principal,
	grn types2.GRN) (math.Uint,
	error)

func (Keeper) DiscontinueBucket added in v0.1.2

func (k Keeper) DiscontinueBucket(ctx sdk.Context, operator sdk.AccAddress, bucketName, reason string) error

func (Keeper) DiscontinueBucketMax added in v0.1.2

func (k Keeper) DiscontinueBucketMax(ctx sdk.Context) (res uint64)

func (Keeper) DiscontinueConfirmPeriod added in v0.1.2

func (k Keeper) DiscontinueConfirmPeriod(ctx sdk.Context) (res int64)

func (Keeper) DiscontinueCountingWindow added in v0.1.2

func (k Keeper) DiscontinueCountingWindow(ctx sdk.Context) (res uint64)

func (Keeper) DiscontinueDeletionMax added in v0.1.2

func (k Keeper) DiscontinueDeletionMax(ctx sdk.Context) (res uint64)

func (Keeper) DiscontinueObject added in v0.1.2

func (k Keeper) DiscontinueObject(ctx sdk.Context, operator sdk.AccAddress, bucketName string, objectIds []sdkmath.Uint, reason string) error

func (Keeper) DiscontinueObjectMax added in v0.1.2

func (k Keeper) DiscontinueObjectMax(ctx sdk.Context) (res uint64)

func (Keeper) ForceDeleteBucket added in v0.1.2

func (k Keeper) ForceDeleteBucket(ctx sdk.Context, bucketId sdkmath.Uint, cap uint64) (bool, uint64, error)

ForceDeleteBucket will delete bucket without permission check, it is used for discontinue request from sps. The cap parameter will limit the max objects can be deleted in the call. It will also return 1) whether the bucket is deleted, 2) the objects deleted, and 3) error if there is

func (Keeper) ForceDeleteObject added in v0.1.2

func (k Keeper) ForceDeleteObject(ctx sdk.Context, objectId sdkmath.Uint) error

ForceDeleteObject will delete object without permission check, it is used for discontinue request from sps.

func (Keeper) GarbageCollectResourcesStalePolicy added in v0.2.0

func (k Keeper) GarbageCollectResourcesStalePolicy(ctx sdk.Context)

func (Keeper) GenNextBucketId added in v0.0.7

func (k Keeper) GenNextBucketId(ctx sdk.Context) sdkmath.Uint

func (Keeper) GenNextGroupId added in v0.0.7

func (k Keeper) GenNextGroupId(ctx sdk.Context) sdkmath.Uint

func (Keeper) GenNextObjectID added in v0.0.7

func (k Keeper) GenNextObjectID(ctx sdk.Context) sdkmath.Uint

func (Keeper) GetAuthority added in v0.2.0

func (k Keeper) GetAuthority() string

func (Keeper) GetBucketInfo added in v0.0.7

func (k Keeper) GetBucketInfo(ctx sdk.Context, bucketName string) (*types.BucketInfo, bool)

func (Keeper) GetBucketInfoById added in v0.0.7

func (k Keeper) GetBucketInfoById(ctx sdk.Context, bucketId sdkmath.Uint) (*types.BucketInfo, bool)

func (Keeper) GetBucketReadBill added in v0.2.3

func (k Keeper) GetBucketReadBill(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) (userFlows types.UserFlows, err error)

func (Keeper) GetBucketReadStoreBill added in v0.2.3

func (k Keeper) GetBucketReadStoreBill(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) (userFlows types.UserFlows, err error)

func (Keeper) GetExpectSecondarySPNumForECObject added in v0.0.9

func (k Keeper) GetExpectSecondarySPNumForECObject(ctx sdk.Context, createTime int64) (res uint32)

func (Keeper) GetGroupInfo added in v0.0.7

func (k Keeper) GetGroupInfo(ctx sdk.Context, ownerAddr sdk.AccAddress,
	groupName string) (*types.GroupInfo, bool)

func (Keeper) GetGroupInfoById added in v0.0.7

func (k Keeper) GetGroupInfoById(ctx sdk.Context, groupId sdkmath.Uint) (*types.GroupInfo, bool)

func (Keeper) GetInternalBucketInfo added in v0.2.3

func (k Keeper) GetInternalBucketInfo(ctx sdk.Context, bucketID sdkmath.Uint) (*types.InternalBucketInfo, bool)

func (Keeper) GetMigrationBucketInfo added in v0.2.3

func (k Keeper) GetMigrationBucketInfo(ctx sdk.Context, bucketID sdkmath.Uint) (*types.MigrationBucketInfo, bool)

func (Keeper) GetObjectChargeSize added in v0.2.3

func (k Keeper) GetObjectChargeSize(ctx sdk.Context, payloadSize uint64, ts int64) (size uint64, err error)

func (Keeper) GetObjectGVG added in v0.2.3

func (k Keeper) GetObjectGVG(ctx sdk.Context, bucketID math.Uint, lvgID uint32) (*vgtypes.GlobalVirtualGroup, bool)

func (Keeper) GetObjectInfo added in v0.0.7

func (k Keeper) GetObjectInfo(ctx sdk.Context, bucketName string, objectName string) (*types.ObjectInfo, bool)

func (Keeper) GetObjectInfoById added in v0.0.7

func (k Keeper) GetObjectInfoById(ctx sdk.Context, objectId sdkmath.Uint) (*types.ObjectInfo, bool)

func (Keeper) GetObjectInfoCount added in v0.0.7

func (k Keeper) GetObjectInfoCount(ctx sdk.Context) sdkmath.Uint

func (Keeper) GetObjectLockFee added in v0.0.7

func (k Keeper) GetObjectLockFee(ctx sdk.Context, primarySpId uint32, priceTime int64, payloadSize uint64) (amount sdkmath.Int, err error)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the current storage module parameters.

func (Keeper) GetPolicy added in v0.0.7

func (k Keeper) GetPolicy(ctx sdk.Context, grn *types2.GRN, principal *permtypes.Principal) (*permtypes.Policy, error)

func (Keeper) GetPrimarySPForBucket added in v0.2.3

func (k Keeper) GetPrimarySPForBucket(ctx sdk.Context, bucketInfo *types.BucketInfo) (*sptypes.StorageProvider, error)

func (Keeper) GetVersionedParamsWithTs added in v0.2.0

func (k Keeper) GetVersionedParamsWithTs(ctx sdk.Context, ts int64) (verParams types.VersionedParams, err error)

GetVersionedParamsWithTs find the latest params before and equal than the specific timestamp

func (Keeper) HeadBucket added in v0.0.6

func (Keeper) HeadBucketById added in v0.0.7

func (Keeper) HeadBucketExtra added in v0.2.3

func (Keeper) HeadBucketNFT added in v0.0.7

func (k Keeper) HeadBucketNFT(goCtx context.Context, req *types.QueryNFTRequest) (*types.QueryBucketNFTResponse, error)

func (Keeper) HeadGroup added in v0.0.8

func (Keeper) HeadGroupMember added in v0.0.8

func (Keeper) HeadGroupNFT added in v0.0.7

func (k Keeper) HeadGroupNFT(goCtx context.Context, req *types.QueryNFTRequest) (*types.QueryGroupNFTResponse, error)

func (Keeper) HeadObject added in v0.0.6

func (Keeper) HeadObjectById added in v0.0.7

func (Keeper) HeadObjectNFT added in v0.0.7

func (k Keeper) HeadObjectNFT(goCtx context.Context, req *types.QueryNFTRequest) (*types.QueryObjectNFTResponse, error)

func (Keeper) IsPriceChanged added in v0.2.3

func (k Keeper) IsPriceChanged(ctx sdk.Context, primarySpId uint32, priceTime int64) (bool, *types.StoragePrice, sdk.Dec, *types.StoragePrice, sdk.Dec, error)

func (Keeper) LeaveGroup added in v0.0.7

func (k Keeper) LeaveGroup(
	ctx sdk.Context, member sdk.AccAddress, owner sdk.AccAddress,
	groupName string, opts LeaveGroupOptions) error

func (Keeper) ListBuckets added in v0.0.6

func (Keeper) ListGroup added in v0.0.8

func (Keeper) ListObjects added in v0.0.6

func (Keeper) ListObjectsByBucketId added in v0.0.7

func (Keeper) LockObjectStoreFee added in v0.2.3

func (k Keeper) LockObjectStoreFee(ctx sdk.Context, primarySpId uint32, bucketInfo *storagetypes.BucketInfo, objectInfo *storagetypes.ObjectInfo) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MaxBucketsPerAccount added in v0.0.10

func (k Keeper) MaxBucketsPerAccount(ctx sdk.Context) (res uint32)

func (Keeper) MaxLocalVirtualGroupNumPerBucket added in v0.2.3

func (k Keeper) MaxLocalVirtualGroupNumPerBucket(ctx sdk.Context) (res uint32)

func (Keeper) MaxPayloadSize

func (k Keeper) MaxPayloadSize(ctx sdk.Context) (res uint64)

func (Keeper) MaxSegmentSize

func (k Keeper) MaxSegmentSize(ctx sdk.Context) (res uint64)

func (Keeper) MigrateBucket added in v0.2.3

func (k Keeper) MigrateBucket(ctx sdk.Context, operator sdk.AccAddress, bucketName string, dstPrimarySPID uint32, dstPrimarySPApproval *common.Approval, approvalBytes []byte) error

func (Keeper) MinChargeSize added in v0.0.7

func (k Keeper) MinChargeSize(ctx sdk.Context) (res uint64)

func (Keeper) MirrorBucketAckRelayerFee added in v0.0.9

func (k Keeper) MirrorBucketAckRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MirrorBucketRelayerFee added in v0.0.9

func (k Keeper) MirrorBucketRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MirrorGroupAckRelayerFee added in v0.0.9

func (k Keeper) MirrorGroupAckRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MirrorGroupRelayerFee added in v0.0.9

func (k Keeper) MirrorGroupRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MirrorObjectAckRelayerFee added in v0.0.9

func (k Keeper) MirrorObjectAckRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MirrorObjectRelayerFee added in v0.0.9

func (k Keeper) MirrorObjectRelayerFee(ctx sdk.Context) *big.Int

func (Keeper) MustGetInternalBucketInfo added in v0.2.3

func (k Keeper) MustGetInternalBucketInfo(ctx sdk.Context, bucketID sdkmath.Uint) *types.InternalBucketInfo

func (Keeper) MustGetPrimarySPForBucket added in v0.2.3

func (k Keeper) MustGetPrimarySPForBucket(ctx sdk.Context, bucketInfo *types.BucketInfo) *sptypes.StorageProvider

func (Keeper) Params

func (Keeper) PersistDeleteInfo added in v0.2.0

func (k Keeper) PersistDeleteInfo(ctx sdk.Context)

func (Keeper) PutPolicy added in v0.0.7

func (k Keeper) PutPolicy(ctx sdk.Context, operator sdk.AccAddress, grn types2.GRN,
	policy *permtypes.Policy) (math.Uint, error)

func (Keeper) QueryIsPriceChanged added in v0.2.3

func (Keeper) QueryLockFee added in v0.2.3

func (Keeper) QueryParamsByTimestamp added in v0.2.2

func (Keeper) QueryPolicyById added in v0.2.0

func (Keeper) QueryPolicyForAccount added in v0.0.8

func (Keeper) QueryPolicyForGroup added in v0.0.8

func (Keeper) RebindingVirtualGroup added in v0.2.3

func (k Keeper) RebindingVirtualGroup(ctx sdk.Context, bucketInfo *types.BucketInfo, internalBucketInfo *types.InternalBucketInfo, gvgMappings []*types.GVGMapping) error

func (Keeper) RedundantDataChunkNum

func (k Keeper) RedundantDataChunkNum(ctx sdk.Context) (res uint32)

func (Keeper) RedundantParityChunkNum

func (k Keeper) RedundantParityChunkNum(ctx sdk.Context) (res uint32)

func (Keeper) RejectSealObject added in v0.0.7

func (k Keeper) RejectSealObject(ctx sdk.Context, operator sdk.AccAddress, bucketName, objectName string) error

func (Keeper) SealEmptyObjectOnVirtualGroup added in v0.2.3

func (k Keeper) SealEmptyObjectOnVirtualGroup(ctx sdk.Context, bucketInfo *types.BucketInfo, objectInfo *types.ObjectInfo) (*types.LocalVirtualGroup, error)

func (Keeper) SealObject added in v0.0.7

func (k Keeper) SealObject(
	ctx sdk.Context, spSealAcc sdk.AccAddress,
	bucketName, objectName string, opts SealObjectOptions) error

func (Keeper) SealObjectOnVirtualGroup added in v0.2.3

func (k Keeper) SealObjectOnVirtualGroup(ctx sdk.Context, bucketInfo *types.BucketInfo, gvgID uint32, objectInfo *types.ObjectInfo) (*types.LocalVirtualGroup, error)

func (Keeper) SetBucketInfo added in v0.0.9

func (k Keeper) SetBucketInfo(ctx sdk.Context, bucketInfo *types.BucketInfo)

func (Keeper) SetGroupInfo added in v0.0.9

func (k Keeper) SetGroupInfo(ctx sdk.Context, groupInfo *types.GroupInfo)

func (Keeper) SetInternalBucketInfo added in v0.2.3

func (k Keeper) SetInternalBucketInfo(ctx sdk.Context, bucketID sdkmath.Uint, internalBucketInfo *types.InternalBucketInfo)

func (Keeper) SetObjectInfo added in v0.0.9

func (k Keeper) SetObjectInfo(ctx sdk.Context, objectInfo *types.ObjectInfo)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the params of storage module

func (Keeper) SetVersionedParamsWithTs added in v0.2.0

func (k Keeper) SetVersionedParamsWithTs(ctx sdk.Context, verParams types.VersionedParams) error

SetVersionedParamsWithTs set a specific params in the store from its index

func (Keeper) StalePolicyCleanupMax added in v0.2.0

func (k Keeper) StalePolicyCleanupMax(ctx sdk.Context) (res uint64)

func (Keeper) UnChargeBucketReadFee added in v0.2.3

func (k Keeper) UnChargeBucketReadFee(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) error

func (Keeper) UnChargeBucketReadStoreFee added in v0.2.3

func (k Keeper) UnChargeBucketReadStoreFee(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo) error

func (Keeper) UnChargeObjectStoreFee added in v0.2.3

func (k Keeper) UnChargeObjectStoreFee(ctx sdk.Context, primarySpId uint32, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, objectInfo *storagetypes.ObjectInfo) error

func (Keeper) UnlockAndChargeObjectStoreFee added in v0.2.3

func (k Keeper) UnlockAndChargeObjectStoreFee(ctx sdk.Context, primarySpId uint32, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, objectInfo *storagetypes.ObjectInfo) error

func (Keeper) UnlockObjectStoreFee added in v0.2.3

func (k Keeper) UnlockObjectStoreFee(ctx sdk.Context, primarySpId uint32, bucketInfo *storagetypes.BucketInfo, objectInfo *storagetypes.ObjectInfo) error

UnlockObjectStoreFee unlock store fee if the object is deleted in INIT state

func (Keeper) UpdateBucketInfo added in v0.0.7

func (k Keeper) UpdateBucketInfo(ctx sdk.Context, operator sdk.AccAddress, bucketName string, opts UpdateBucketOptions) error

func (Keeper) UpdateBucketInfoAndCharge added in v0.0.7

func (k Keeper) UpdateBucketInfoAndCharge(ctx sdk.Context, bucketInfo *storagetypes.BucketInfo,
	internalBucketInfo *storagetypes.InternalBucketInfo, newPaymentAddr string, newReadQuota uint64) error

func (Keeper) UpdateGroupExtra added in v0.2.2

func (k Keeper) UpdateGroupExtra(ctx sdk.Context, operator sdk.AccAddress, groupInfo *types.GroupInfo, extra string) error

func (Keeper) UpdateGroupMember added in v0.0.7

func (k Keeper) UpdateGroupMember(ctx sdk.Context, operator sdk.AccAddress, groupInfo *types.GroupInfo, opts UpdateGroupMemberOptions) error

func (Keeper) UpdateObjectInfo added in v0.1.2

func (k Keeper) UpdateObjectInfo(ctx sdk.Context, operator sdk.AccAddress, bucketName, objectName string, visibility types.VisibilityType) error

func (Keeper) VerifyBucketPermission added in v0.0.7

func (k Keeper) VerifyBucketPermission(ctx sdk.Context, bucketInfo *types.BucketInfo, operator sdk.AccAddress,
	action permtypes.ActionType, options *permtypes.VerifyOptions) permtypes.Effect

VerifyBucketPermission Bucket permissions checks are divided into three steps: First, if the bucket is a public bucket and the action is a read-only action, it returns "allow". Second, if the operator is the owner of the bucket, it returns "allow", as the owner has the highest permission. Third, verify the policy corresponding to the bucket and the operator.

  1. If the policy is evaluated as "allow", return "allow" to the user.
  2. If it is evaluated as "deny" or "unspecified", return "deny".

func (Keeper) VerifyGVGSecondarySPsBlsSignature added in v0.2.3

func (k Keeper) VerifyGVGSecondarySPsBlsSignature(ctx sdk.Context, gvg *vgtypes.GlobalVirtualGroup, signHash [32]byte, signature []byte) error

func (Keeper) VerifyGroupPermission added in v0.0.7

func (k Keeper) VerifyGroupPermission(ctx sdk.Context, groupInfo *types.GroupInfo, operator sdk.AccAddress,
	action permtypes.ActionType) permtypes.Effect

func (Keeper) VerifyObjectPermission added in v0.0.7

func (k Keeper) VerifyObjectPermission(ctx sdk.Context, bucketInfo *types.BucketInfo, objectInfo *types.ObjectInfo,
	operator sdk.AccAddress, action permtypes.ActionType) permtypes.Effect

VerifyObjectPermission Object permission checks are divided into four steps: First, if the object is a public object and the action is a read-only action, it returns "allow". Second, if the operator is the owner of the bucket, it returns "allow" Third, verify the policy corresponding to the bucket and the operator

  1. If it is evaluated as "deny", return "deny"
  2. If it is evaluated as "allow" or "unspecified", go ahead (Noted as EffectBucket)

Four, verify the policy corresponding to the object and the operator

  1. If it is evaluated as "deny", return "deny".
  2. If it is evaluated as "allow", return "allow".
  3. If it is evaluated as "unspecified", then if the EffectBucket is "allow", return allow
  4. If it is evaluated as "unspecified", then if the EffectBucket is "unspecified", return deny

func (Keeper) VerifyPaymentAccount added in v0.0.7

func (k Keeper) VerifyPaymentAccount(ctx sdk.Context, paymentAddress string, ownerAcc sdk.AccAddress) (sdk.AccAddress, error)

func (Keeper) VerifyPermission added in v0.0.7

func (Keeper) VerifySPAndSignature added in v0.0.6

func (k Keeper) VerifySPAndSignature(ctx sdk.Context, sp *sptypes.StorageProvider, sigData []byte, signature []byte) error

type LeaveGroupOptions added in v0.0.7

type LeaveGroupOptions struct {
	SourceType types.SourceType
}

type ObjectApp added in v0.0.9

type ObjectApp struct {
	// contains filtered or unexported fields
}

func NewObjectApp added in v0.0.9

func NewObjectApp(keeper Keeper) *ObjectApp

func (*ObjectApp) ExecuteAckPackage added in v0.0.9

func (app *ObjectApp) ExecuteAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*ObjectApp) ExecuteFailAckPackage added in v0.0.9

func (app *ObjectApp) ExecuteFailAckPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

func (*ObjectApp) ExecuteSynPackage added in v0.0.9

func (app *ObjectApp) ExecuteSynPackage(ctx sdk.Context, appCtx *sdk.CrossChainAppContext, payload []byte) sdk.ExecuteResult

type SealObjectOptions added in v0.0.7

type SealObjectOptions struct {
	GlobalVirtualGroupId     uint32
	SecondarySpBlsSignatures []byte
}

type UpdateBucketOptions added in v0.0.7

type UpdateBucketOptions struct {
	Visibility       types.VisibilityType
	SourceType       types.SourceType
	PaymentAddress   string
	ChargedReadQuota *uint64
}

type UpdateGroupMemberOptions added in v0.0.7

type UpdateGroupMemberOptions struct {
	SourceType      types.SourceType
	MembersToAdd    []string
	MembersToDelete []string
}

Jump to

Keyboard shortcuts

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