MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / GetDoc

Method GetDoc

service/api-doc/iml.go:119–133  ·  view source on GitHub ↗
(ctx context.Context, serviceId string)

Source from the content-addressed store, hash-verified

117}
118
119func (i *imlAPIDocService) GetDoc(ctx context.Context, serviceId string) (*Doc, error) {
120 info, err := i.store.First(ctx, map[string]interface{}{
121 "service": serviceId,
122 })
123 if err != nil {
124 return nil, err
125 }
126 return &Doc{
127 Id: info.UUID,
128 Service: info.Service,
129 Content: info.Content,
130 Updater: info.Updater,
131 UpdateAt: info.UpdateAt,
132 }, nil
133}
134
135func (i *imlAPIDocService) LatestDocCommit(ctx context.Context, serviceId string) (*commit.Commit[DocCommit], error) {
136 return i.commitService.Latest(ctx, serviceId)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected