MCPcopy Create free account
hub / github.com/blues/note / parseCompositeNoteID

Function parseCompositeNoteID

lib/notebox.go:75–82  ·  view source on GitHub ↗

parseCompositeNoteID extracts componets from a Notebox Note ID

(noteid string)

Source from the content-addressed store, hash-verified

73
74// parseCompositeNoteID extracts componets from a Notebox Note ID
75func parseCompositeNoteID(noteid string) (isInstance bool, endpoint string, notefile string) {
76 s := strings.Split(noteid, ReservedIDDelimiter)
77 // If this isn't a local instance NoteID, return that fact (with an invalid endpoint ID in that field)
78 if len(s) != 2 {
79 return false, ReservedIDDelimiter, noteid
80 }
81 return true, s[0], s[1]
82}
83
84// Initialize notebox storage
85func initNotebox(ctx context.Context, endpointID string, boxStorage string, storage storage) (err error) {

Callers 3

NotefilesMethod · 0.85
MergeNoteboxMethod · 0.85
NoteboxNotefileDescMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected