Documentation ¶
Index ¶
- type Metadata
- func (metadata *Metadata) GetBucketByBucketID(ctx context.Context, req *metatypes.GetBucketByBucketIDRequest) (resp *metatypes.GetBucketByBucketIDResponse, err error)
- func (metadata *Metadata) GetBucketByBucketName(ctx context.Context, req *metatypes.GetBucketByBucketNameRequest) (resp *metatypes.GetBucketByBucketNameResponse, err error)
- func (metadata *Metadata) GetBucketMeta(ctx context.Context, req *metatypes.GetBucketMetaRequest) (resp *metatypes.GetBucketMetaResponse, err error)
- func (metadata *Metadata) GetObjectMeta(ctx context.Context, req *metatypes.GetObjectMetaRequest) (resp *metatypes.GetObjectMetaResponse, err error)
- func (metadata *Metadata) GetPaymentByBucketID(ctx context.Context, req *metatypes.GetPaymentByBucketIDRequest) (resp *metatypes.GetPaymentByBucketIDResponse, err error)
- func (metadata *Metadata) GetPaymentByBucketName(ctx context.Context, req *metatypes.GetPaymentByBucketNameRequest) (resp *metatypes.GetPaymentByBucketNameResponse, err error)
- func (metadata *Metadata) GetUserBuckets(ctx context.Context, req *metatypes.GetUserBucketsRequest) (resp *metatypes.GetUserBucketsResponse, err error)
- func (metadata *Metadata) GetUserBucketsCount(ctx context.Context, req *metatypes.GetUserBucketsCountRequest) (resp *metatypes.GetUserBucketsCountResponse, err error)
- func (metadata *Metadata) ListDeletedObjectsByBlockNumberRange(ctx context.Context, ...) (resp *metatypes.ListDeletedObjectsByBlockNumberRangeResponse, err error)
- func (metadata *Metadata) ListExpiredBucketsBySp(ctx context.Context, req *metatypes.ListExpiredBucketsBySpRequest) (resp *metatypes.ListExpiredBucketsBySpResponse, err error)
- func (metadata *Metadata) ListObjectsByBucketName(ctx context.Context, req *metatypes.ListObjectsByBucketNameRequest) (resp *metatypes.ListObjectsByBucketNameResponse, err error)
- func (metadata *Metadata) Name() string
- func (metadata *Metadata) Start(ctx context.Context) error
- func (metadata *Metadata) Stop(ctx context.Context) error
- func (metadata *Metadata) VerifyBucketPermission(ctx context.Context, bucketInfo *bsdb.Bucket, operator sdk.AccAddress, ...) (permtypes.Effect, error)
- func (metadata *Metadata) VerifyObjectPermission(ctx context.Context, bucketInfo *bsdb.Bucket, objectInfo *bsdb.Object, ...) (permtypes.Effect, error)
- func (metadata *Metadata) VerifyPermission(ctx context.Context, req *storagetypes.QueryVerifyPermissionRequest) (resp *storagetypes.QueryVerifyPermissionResponse, err error)
- func (metadata *Metadata) VerifyPolicy(ctx context.Context, resourceID math.Uint, resourceType resource.ResourceType, ...) (permtypes.Effect, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata implements the gRPC of MetadataService, responsible for interact with SP for complex query service.
func NewMetadataService ¶
func NewMetadataService(config *metadata.MetadataConfig) (metadata *Metadata, err error)
NewMetadataService returns an instance of Metadata that supply query service for Inscription network
func (*Metadata) GetBucketByBucketID ¶
func (metadata *Metadata) GetBucketByBucketID(ctx context.Context, req *metatypes.GetBucketByBucketIDRequest) (resp *metatypes.GetBucketByBucketIDResponse, err error)
GetBucketByBucketID get buckets info by by a bucket id
func (*Metadata) GetBucketByBucketName ¶
func (metadata *Metadata) GetBucketByBucketName(ctx context.Context, req *metatypes.GetBucketByBucketNameRequest) (resp *metatypes.GetBucketByBucketNameResponse, err error)
GetBucketByBucketName get buckets info by a bucket name
func (*Metadata) GetBucketMeta ¶ added in v0.2.0
func (metadata *Metadata) GetBucketMeta(ctx context.Context, req *metatypes.GetBucketMetaRequest) (resp *metatypes.GetBucketMetaResponse, err error)
GetBucketMeta get bucket metadata
func (*Metadata) GetObjectMeta ¶ added in v0.2.0
func (metadata *Metadata) GetObjectMeta(ctx context.Context, req *metatypes.GetObjectMetaRequest) (resp *metatypes.GetObjectMetaResponse, err error)
GetObjectMeta get object metadata
func (*Metadata) GetPaymentByBucketID ¶
func (metadata *Metadata) GetPaymentByBucketID(ctx context.Context, req *metatypes.GetPaymentByBucketIDRequest) (resp *metatypes.GetPaymentByBucketIDResponse, err error)
GetPaymentByBucketID get bucket payment info by a bucket id
func (*Metadata) GetPaymentByBucketName ¶
func (metadata *Metadata) GetPaymentByBucketName(ctx context.Context, req *metatypes.GetPaymentByBucketNameRequest) (resp *metatypes.GetPaymentByBucketNameResponse, err error)
GetPaymentByBucketName get bucket payment info by a bucket name
func (*Metadata) GetUserBuckets ¶
func (metadata *Metadata) GetUserBuckets(ctx context.Context, req *metatypes.GetUserBucketsRequest) (resp *metatypes.GetUserBucketsResponse, err error)
GetUserBuckets get buckets info by a user address
func (*Metadata) GetUserBucketsCount ¶
func (metadata *Metadata) GetUserBucketsCount(ctx context.Context, req *metatypes.GetUserBucketsCountRequest) (resp *metatypes.GetUserBucketsCountResponse, err error)
GetUserBucketsCount get buckets count by a user address
func (*Metadata) ListDeletedObjectsByBlockNumberRange ¶
func (metadata *Metadata) ListDeletedObjectsByBlockNumberRange(ctx context.Context, req *metatypes.ListDeletedObjectsByBlockNumberRangeRequest) (resp *metatypes.ListDeletedObjectsByBlockNumberRangeResponse, err error)
ListDeletedObjectsByBlockNumberRange list deleted objects info by a block number range
func (*Metadata) ListExpiredBucketsBySp ¶ added in v0.1.2
func (metadata *Metadata) ListExpiredBucketsBySp(ctx context.Context, req *metatypes.ListExpiredBucketsBySpRequest) (resp *metatypes.ListExpiredBucketsBySpResponse, err error)
ListExpiredBucketsBySp list expired bucket by sp
func (*Metadata) ListObjectsByBucketName ¶
func (metadata *Metadata) ListObjectsByBucketName(ctx context.Context, req *metatypes.ListObjectsByBucketNameRequest) (resp *metatypes.ListObjectsByBucketNameResponse, err error)
ListObjectsByBucketName list objects info by a bucket name
func (*Metadata) VerifyBucketPermission ¶ added in v0.1.2
func (metadata *Metadata) VerifyBucketPermission(ctx context.Context, bucketInfo *bsdb.Bucket, operator sdk.AccAddress, action permtypes.ActionType, options *permtypes.VerifyOptions) (permtypes.Effect, error)
VerifyBucketPermission verify bucket permission
func (*Metadata) VerifyObjectPermission ¶ added in v0.1.2
func (metadata *Metadata) VerifyObjectPermission(ctx context.Context, bucketInfo *bsdb.Bucket, objectInfo *bsdb.Object, operator sdk.AccAddress, action permtypes.ActionType) (permtypes.Effect, error)
VerifyObjectPermission verify object permission
func (*Metadata) VerifyPermission ¶ added in v0.1.2
func (metadata *Metadata) VerifyPermission(ctx context.Context, req *storagetypes.QueryVerifyPermissionRequest) (resp *storagetypes.QueryVerifyPermissionResponse, err error)
VerifyPermission Verify the input account’s permission to input items
func (*Metadata) VerifyPolicy ¶ added in v0.1.2
func (metadata *Metadata) VerifyPolicy(ctx context.Context, resourceID math.Uint, resourceType resource.ResourceType, operator sdk.AccAddress, action permtypes.ActionType, opts *permtypes.VerifyOptions) (permtypes.Effect, error)
VerifyPolicy verify policy of permission