MCPcopy Index your code
hub / github.com/perkeep/perkeep / MakeViewModel

Method MakeViewModel

app/scanningcabinet/models.go:196–207  ·  view source on GitHub ↗

MakeViewModel returns a new DocumentVM with the data from this struct

()

Source from the content-addressed store, hash-verified

194
195// MakeViewModel returns a new DocumentVM with the data from this struct
196func (doc *document) MakeViewModel() DocumentVM {
197 return DocumentVM{
198 BlobRef: doc.permanode,
199 DisplayUrl: doc.displayURL(),
200 Title: doc.title,
201 SomeTitle: doc.someTitle(),
202 DateYyyyMmDd: doc.dateYyyyMmDd(),
203 DueYyyyMmDd: doc.dueYyyyMmDd(),
204 Tags: doc.tags,
205 PhysicalLocation: doc.physicalLocation,
206 }
207}
208
209// MakeDocumentViewModels takes a slice of Documents and returns a slice of
210// the same number of DocumentVMs with the data converted.

Callers 3

MakeDocumentViewModelsFunction · 0.45
handleDocMethod · 0.45

Calls 4

displayURLMethod · 0.95
someTitleMethod · 0.95
dateYyyyMmDdMethod · 0.95
dueYyyyMmDdMethod · 0.95

Tested by

no test coverage detected