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

Method Get

service/upstream/iml.go:91–109  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

89}
90
91func (i *imlUpstreamService) Get(ctx context.Context, id string) (*Upstream, error) {
92 t, err := i.store.First(ctx, map[string]interface{}{"uuid": id})
93 if err != nil {
94 return nil, err
95 }
96
97 return &Upstream{
98 Item: &Item{
99 UUID: t.UUID,
100 Service: t.Service,
101 Team: t.Team,
102 Remark: t.Remark,
103 Creator: t.Creator,
104 Updater: t.Updater,
105 CreateTime: t.CreateAt,
106 UpdateTime: t.UpdateAt,
107 },
108 }, nil
109}
110
111func (i *imlUpstreamService) Save(ctx context.Context, u *SaveUpstream) error {
112 now := time.Now()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected