types

package
v0.2.5-hf.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: AGPL-3.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const (
	BucketTypeAbbr = "b"
	ObjectTypeAbbr = "o"
	GroupTypeAbbr  = "g"
)

Variables

This section is empty.

Functions

func VerifyBlsAggSignature added in v0.2.3

func VerifyBlsAggSignature(blsPubKeys []bls.PublicKey, sigHash [32]byte, blsAggSig []byte) error

func VerifyBlsSignature added in v0.2.3

func VerifyBlsSignature(blsPubKey bls.PublicKey, sigHash [32]byte, blsSig []byte) error

func VerifySignature added in v0.2.3

func VerifySignature(sigAccAddress sdk.AccAddress, sigHash []byte, sig []byte) error

Types

type GRN

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

GRN define a standard ResourceName format, full name: GreenFieldResourceName valid format:

bucket: "grn:b::bucketName"
object: "grn:o::bucketName/objectName"
group: "grn:g:ownerAddress:groupName"

Notice: all the name support wildcards

func NewBucketGRN

func NewBucketGRN(bucketName string) *GRN

NewBucketGRN use to generate a bucket resource with specify bucketName The bucketName support wildcards. E.g. samplebucket, sample*bucket, sample?bucket

func NewGroupGRN

func NewGroupGRN(owner sdk.AccAddress, groupName string) *GRN

func NewObjectGRN

func NewObjectGRN(bucketName, objectName string) *GRN

func (*GRN) GetBucketAndObjectName

func (r *GRN) GetBucketAndObjectName() (string, string, error)

func (*GRN) GetBucketName

func (r *GRN) GetBucketName() (string, error)

func (*GRN) GetGroupOwnerAndAccount

func (r *GRN) GetGroupOwnerAndAccount() (sdk.AccAddress, string, error)

func (*GRN) MustGetBucketAndObjectName

func (r *GRN) MustGetBucketAndObjectName() (string, string)

func (*GRN) MustGetBucketName

func (r *GRN) MustGetBucketName() string

func (*GRN) MustGetGroupOwnerAndAccount

func (r *GRN) MustGetGroupOwnerAndAccount() (sdk.AccAddress, string)

func (*GRN) ParseFromString

func (r *GRN) ParseFromString(res string, wildcards bool) error

func (*GRN) ResourceType

func (r *GRN) ResourceType() resource.ResourceType

func (*GRN) String

func (r *GRN) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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