Documentation
¶
Index ¶
- Constants
- func NewRawDmlObject(rntm *dml.Runtime) (dml.Object, error)
- type Datastructure
- type Document
- type DocumentAPI
- type DocumentHandler
- func (self *DocumentHandler) Close(ctx context.Context)
- func (self *DocumentHandler) CloseDocument(ctx context.Context, docID string) error
- func (self *DocumentHandler) CreateDocument(ctx context.Context, path string) (Document, error)
- func (self *DocumentHandler) Invitations() []string
- func (self *DocumentHandler) ListDocuments() []string
- func (self *DocumentHandler) OpenDocument(ctx context.Context, docID string) error
- type Operation
- type Raw
Constants ¶
const Error_Arguments = "arguments_wrong" // arguments are invalid (e.g. wrong number, wrong type)
const Error_Filesytem = "filesystem" // Problems with filesystem
const Error_Invalid_Data = "data_invalid" // For all kind of wrong data errors
const Error_Operation_Invalid = "operation_invalid" // User operation not possible with current application state
const Error_Process = "process_failed" // For all kind of proccesses or operations
const Error_Setup = "setup_invalid" // The datastructures are not setup correctly
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datastructure ¶
type Datastructure struct {
// contains filtered or unexported fields
}
Async datastructure which encapsulates synchronous DML runtime and a datastore. It works operation based: All operations are carried out ordered
func NewDatastructure ¶
Creates a new shared dml datastructure and exposes it to wamp. * - The dml folder needs to be found in "path", and the datastore will be * created there too. * - Prefix is the wamp URI prefix the datastructure uses. After this prefix all * datastrucutre events are created in /events/... and all methods in /methods/...
func (Datastructure) Close ¶
func (self Datastructure) Close()
func (Datastructure) GetState ¶
func (self Datastructure) GetState() p2p.State
func (Datastructure) Start ¶
func (self Datastructure) Start(s *p2p.Swarm)
Bookepping functions
*****************************************************************************
type Document ¶
type Document struct { ID string // contains filtered or unexported fields }
func NewDocument ¶
type DocumentAPI ¶
type DocumentAPI struct {
// contains filtered or unexported fields
}
A p2p RPC API that allows querying some document details
func (DocumentAPI) DocumentDML ¶
Allows to query the DML cid for a document ID
type DocumentHandler ¶
type DocumentHandler struct {
// contains filtered or unexported fields
}
func NewDocumentHandler ¶
func NewDocumentHandler(router *connection.Router, host *p2p.Host, logger hclog.Logger) (*DocumentHandler, error)
func (*DocumentHandler) Close ¶
func (self *DocumentHandler) Close(ctx context.Context)
func (*DocumentHandler) CloseDocument ¶
func (self *DocumentHandler) CloseDocument(ctx context.Context, docID string) error
func (*DocumentHandler) CreateDocument ¶
func (*DocumentHandler) Invitations ¶
func (self *DocumentHandler) Invitations() []string
func (*DocumentHandler) ListDocuments ¶
func (self *DocumentHandler) ListDocuments() []string
func (*DocumentHandler) OpenDocument ¶
func (self *DocumentHandler) OpenDocument(ctx context.Context, docID string) error
type Operation ¶
type Operation struct { User dml.User Path string Arguments []interface{} KWArguments map[string]interface{} Node p2p.PeerID Session wamp.ID }
type Raw ¶
Raw dml type: stores data identifiers and allows some information gathering
func (*Raw) Clear ¶
func (self *Raw) Clear(id dml.Identifier) error
adds the path, either file or directory, to the Raw object
func (*Raw) Get ¶
func (self *Raw) Get(id dml.Identifier) (string, error)
adds the path, either file or directory, to the Raw object