service

package
v0.2.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

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

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) Name

func (metadata *Metadata) Name() string

Name return the metadata service name, for the lifecycle management

func (*Metadata) Start

func (metadata *Metadata) Start(ctx context.Context) error

Start the metadata gRPC service

func (*Metadata) Stop

func (metadata *Metadata) Stop(ctx context.Context) error

Stop the metadata gRPC service and recycle the resources

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

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

Jump to

Keyboard shortcuts

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