(e *api.API)
| 41 | } |
| 42 | |
| 43 | func FromEntity(e *api.API) *API { |
| 44 | upstream := e.Upstream |
| 45 | if upstream == "" { |
| 46 | upstream = e.Service |
| 47 | } |
| 48 | return &API{ |
| 49 | UUID: e.UUID, |
| 50 | CreateAt: e.CreateAt, |
| 51 | IsDelete: e.IsDelete, |
| 52 | Service: e.Service, |
| 53 | Team: e.Team, |
| 54 | Creator: e.Creator, |
| 55 | Method: e.Method, |
| 56 | Upstream: upstream, |
| 57 | Path: e.Path, |
| 58 | Protocols: e.Protocol, |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func FromEntityInfo(e *api.Info) *Info { |
| 63 | upstream := e.Upstream |
nothing calls this directly
no outgoing calls
no test coverage detected