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

Function GenSimpleDetail

module/router/dto/output.go:42–61  ·  view source on GitHub ↗
(api *api.Info)

Source from the content-addressed store, hash-verified

40}
41
42func GenSimpleDetail(api *api.Info) *SimpleDetail {
43 match := make([]Match, 0)
44 if api.Match == "" {
45 api.Match = "[]"
46 }
47 json.Unmarshal([]byte(api.Match), &match)
48
49 return &SimpleDetail{
50 Id: api.UUID,
51 Name: api.Name,
52 Description: api.Description,
53 Methods: api.Methods,
54 Path: api.Path,
55 MatchRules: match,
56 Creator: auto.UUID(api.Creator),
57 Updater: auto.UUID(api.Updater),
58 CreateTime: auto.TimeLabel(api.CreateAt),
59 UpdateTime: auto.TimeLabel(api.UpdateAt),
60 }
61}
62
63type SimpleDetail struct {
64 Id string `json:"id"`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected