parseCompositeNoteID extracts componets from a Notebox Note ID
(noteid string)
| 73 | |
| 74 | // parseCompositeNoteID extracts componets from a Notebox Note ID |
| 75 | func 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 |
| 85 | func initNotebox(ctx context.Context, endpointID string, boxStorage string, storage storage) (err error) { |
no outgoing calls
no test coverage detected