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

Function FromEntity

service/api/model.go:43–60  ·  view source on GitHub ↗
(e *api.API)

Source from the content-addressed store, hash-verified

41}
42
43func 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
62func FromEntityInfo(e *api.Info) *Info {
63 upstream := e.Upstream

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected