(api *api.Info)
| 40 | } |
| 41 | |
| 42 | func 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 | |
| 63 | type SimpleDetail struct { |
| 64 | Id string `json:"id"` |
nothing calls this directly
no outgoing calls
no test coverage detected