domain

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyAccessCode = errors.New("empty access code provided")
)
View Source
var ErrInvalidKeyType = func(kty string) error {
	return fmt.Errorf("invalid key type: %s", kty)
}
View Source
var ProofAssemblerError = errors.New("couldn't assemble proofs")

Functions

func ValidateKeyType

func ValidateKeyType(kty string) (key.KeyType, error)

Types

type AccessControlType added in v1.2.4

type AccessControlType int
const (
	TotpAccessControl   AccessControlType = iota
	SecretAccessControl AccessControlType = iota
)

func ParseAccessControlType added in v1.2.4

func ParseAccessControlType(value string) (AccessControlType, error)

func (AccessControlType) String added in v1.2.4

func (t AccessControlType) String() string

type BloockProof added in v1.3.2

type BloockProof struct {
	Leaves []string
	Nodes  []string
	Bitmap string
	Depth  string
	Root   string
	Anchor interface{}
}

func JoinBloockMultiProofs added in v1.3.2

func JoinBloockMultiProofs(bloockProofs []BloockProof) (BloockProof, error)

func (BloockProof) AssembleProof added in v1.3.2

func (p BloockProof) AssembleProof(subProof []BloockProof) (BloockProof, error)

type Certification

type Certification struct {
	AnchorID int
	Hash     string
	DataID   string
	Data     []byte
	Record   *record.Record
}

type File

type File struct {
	File []byte
	// contains filtered or unexported fields
}

func NewFile

func NewFile(file []byte, filename, contentType string) File

func (File) Bytes

func (f File) Bytes() []byte

func (File) ContentType

func (f File) ContentType() string

func (File) FileExtension

func (f File) FileExtension() string

func (File) Filename

func (f File) Filename() string

func (File) FilenameWithExtension added in v1.3.0

func (f File) FilenameWithExtension() string

type HostingType

type HostingType int
const (
	IPFS   HostingType = iota
	HOSTED HostingType = iota
	LOCAL  HostingType = iota
)

func ParseHostingType

func ParseHostingType(value string) (HostingType, error)

func (HostingType) String

func (h HostingType) String() string

type KeyType

type KeyType int
const (
	LOCAL_KEY           KeyType = iota
	MANAGED_KEY         KeyType = iota
	LOCAL_CERTIFICATE   KeyType = iota
	MANAGED_CERTIFICATE KeyType = iota
)

func ParseKeySource

func ParseKeySource(value string) (KeyType, error)

func (KeyType) String

func (t KeyType) String() string

type LocalKey

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

func NewLocalKey

func NewLocalKey(localKey key.LocalKey, keyType key.KeyType, id uuid.UUID) *LocalKey

func NewLocalKeyID

func NewLocalKeyID(id uuid.UUID, localKey key.LocalKey, keyType key.KeyType) *LocalKey

func (LocalKey) Id

func (l LocalKey) Id() uuid.UUID

func (LocalKey) KeyType

func (l LocalKey) KeyType() key.KeyType

func (LocalKey) KeyTypeStr

func (l LocalKey) KeyTypeStr() string

func (LocalKey) LocalKey

func (l LocalKey) LocalKey() key.LocalKey

type LocalStorageStrategy

type LocalStorageStrategy int64
const (
	LocalStorageStrategyUnknown LocalStorageStrategy = iota
	LocalStorageStrategyHash
	LocalStorageStrategyFilename
)

func LocalStorageStrategyFromString

func LocalStorageStrategyFromString(strategy string) LocalStorageStrategy

func (LocalStorageStrategy) String

func (s LocalStorageStrategy) String() string

type MerkleTree added in v1.3.0

type MerkleTree struct {
	Root  string
	Proof map[string]MerkleTreeProof
}

type MerkleTreeProof added in v1.3.0

type MerkleTreeProof struct {
	Siblings []string
	Path     uint32
}

func (MerkleTreeProof) ParseToBloockProof added in v1.3.2

func (m MerkleTreeProof) ParseToBloockProof(hash string, root string) (BloockProof, error)

type Message added in v1.3.0

type Message struct {
	Hash     string
	Root     string
	AnchorID int
	Proof    MerkleTreeProof
}

type NormalizedProof added in v1.3.2

type NormalizedProof struct {
	Depths utils.BitsetInt
	Bitmap utils.BitsetBool
	Hashes []string
	Leaves []string
	Root   string
	Anchor interface{}
}

func NormalizedProofFromBloockProof added in v1.3.2

func NormalizedProofFromBloockProof(proofs []BloockProof) ([]NormalizedProof, error)

func (NormalizedProof) ToBloockProof added in v1.3.2

func (p NormalizedProof) ToBloockProof() (BloockProof, error)

type Process added in v1.3.0

type Process struct {
	ID        string    `json:"id"`
	Status    bool      `json:"status"`
	Filename  string    `json:"filename"`
	CreatedAt time.Time `json:"created_at"`
	pkg.ProcessResponse
}

type Stack added in v1.3.0

type Stack struct {
	Sibling []byte
	Depth   int
}

Directories

Path Synopsis
mocks
Package mock_repository is a generated GoMock package.
Package mock_repository is a generated GoMock package.

Jump to

Keyboard shortcuts

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