marker

package
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTicket

type AuthTicket struct {
	ClientID        string `json:"client_id"`
	OwnerID         string `json:"owner_id"`
	AllocationID    string `json:"allocation_id"`
	FilePathHash    string `json:"file_path_hash"`
	ActualFileHash  string `json:"actual_file_hash"`
	FileName        string `json:"file_name"`
	RefType         string `json:"reference_type"`
	Expiration      int64  `json:"expiration"`
	Timestamp       int64  `json:"timestamp"`
	ReEncryptionKey string `json:"re_encryption_key,omitempty"`
	Encrypted       bool   `json:"encrypted"`
	Signature       string `json:"signature"`
}

func (*AuthTicket) GetHashData

func (at *AuthTicket) GetHashData() string

func (*AuthTicket) Sign

func (at *AuthTicket) Sign() error

type DeleteToken

type DeleteToken struct {
	FilePathHash string `json:"file_path_hash"`
	FileRefHash  string `json:"file_ref_hash"`
	AllocationID string `json:"allocation_id"`
	Size         int64  `json:"size"`
	BlobberID    string `json:"blobber_id"`
	Timestamp    int64  `json:"timestamp"`
	ClientID     string `json:"client_id"`
	Signature    string `json:"signature"`
}

func (*DeleteToken) GetHash

func (dt *DeleteToken) GetHash() string

func (*DeleteToken) Sign

func (dt *DeleteToken) Sign() error

type ReadMarker

type ReadMarker struct {
	ClientID        string           `json:"client_id"`
	ClientPublicKey string           `json:"client_public_key"`
	BlobberID       string           `json:"blobber_id"`
	AllocationID    string           `json:"allocation_id"`
	OwnerID         string           `json:"owner_id"`
	Timestamp       common.Timestamp `json:"timestamp"`
	ReadCounter     int64            `json:"counter"`
	Signature       string           `json:"signature"`
	SessionRC       int64            `json:"session_rc"`
}

func (*ReadMarker) GetHash

func (rm *ReadMarker) GetHash() string

func (*ReadMarker) Sign

func (rm *ReadMarker) Sign() error

func (*ReadMarker) ValidateWithOtherRM added in v1.8.2

func (rm *ReadMarker) ValidateWithOtherRM(rm1 *ReadMarker) error

ValidateWithOtherRM will validate rm1 assuming rm is valid. It checks parameters equality and validity of signature

type WriteMarker

type WriteMarker struct {
	AllocationRoot         string `json:"allocation_root"`
	PreviousAllocationRoot string `json:"prev_allocation_root"`
	FileMetaRoot           string `json:"file_meta_root"`
	AllocationID           string `json:"allocation_id"`
	Size                   int64  `json:"size"`
	BlobberID              string `json:"blobber_id"`
	Timestamp              int64  `json:"timestamp"`
	ClientID               string `json:"client_id"`
	Signature              string `json:"signature"`
}

func (*WriteMarker) GetHash

func (wm *WriteMarker) GetHash() string

func (*WriteMarker) GetHashData

func (wm *WriteMarker) GetHashData() string

func (*WriteMarker) Sign

func (wm *WriteMarker) Sign() error

func (*WriteMarker) VerifySignature

func (wm *WriteMarker) VerifySignature(clientPublicKey string) error

Jump to

Keyboard shortcuts

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