src

package
v0.0.0-...-72dc9a7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJECTID = "object_id"
)

Variables

Functions

This section is empty.

Types

type Dag

type Dag interface {
	Compare()
	Merge()
	// contains filtered or unexported methods
}

type Identity

type Identity struct {
	ID         string             `json:"id,omitempty"`
	PublicKey  []byte             `json:"publicKey,omitempty"`
	Signatures *IdentitySignature `json:"signatures,omitempty"`
	Type       string             `json:"type,omitempty"`
}

func (*Identity) Filtered

func (i *Identity) Filtered() *Identity

Filtered gets fields that should be present in the CBOR representation of identity.

func (*Identity) GetPublicKey

func (i *Identity) GetPublicKey() (ic.PubKey, error)

GetPublicKey returns the public key of an identity.

type IdentitySignature

type IdentitySignature struct {
	ID        []byte `json:"id,omitempty"`
	PublicKey []byte `json:"publicKey,omitempty"`
}
type Link interface {
	InsertLink(linkId string, nodeId string, lastNodeId string) (bool, error)
	DeleteLink(linkId string) error
}

type LinkFactory

type LinkFactory struct {
}
func (link *LinkFactory) DeleteLink(linkId string) error
func (link *LinkFactory) InsertLink(linkId string, nodeId string, lastNodeIds []string) (bool, error)

*

  • Insert link into the database
  • creates a new link with the given all of lastNodeIds and nodeId
  • returns linkId if successful, error otherwise *

type Node

type Node interface {
	InsertNode(node_id string, node_type string, lamport_clock int64, receiving_timestamp int32,
		receiving_date string, sending_date string, sending_timestamp int32, last_node_id string) (bool, error)
	FindNode()
	DeleteNode()
	UpdateNode()
}

type NodeFactory

type NodeFactory struct {
}

func (*NodeFactory) InsertNode

func (node *NodeFactory) InsertNode(nodeId string, nodeType string, lamportClock int64, receivingTimestamp int32,
	receivingDate string, sendingDate string, sendingTimestamp int32, lastNodeId string) (bool, error)

type Object

type Object interface {

	// it need  to  note that  if the object content is repeated, only one can be saved,
	// and  then return the repeatedly object id
	InsertObject(orm orm.DBconnect, objectId string, nodeId string, Content string, Operation string,
		Propertie string) (bool, error)
}

type ObjectFactory

type ObjectFactory struct {
}

func (*ObjectFactory) InsertObject

func (object *ObjectFactory) InsertObject(objectId string, nodeId string, content string, operation string,
	property string) (bool, error)

Jump to

Keyboard shortcuts

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