MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Update

Method Update

module/system-apikey/iml.go:227–243  ·  view source on GitHub ↗
(ctx context.Context, id string, input *system_apikey_dto.Update)

Source from the content-addressed store, hash-verified

225}
226
227func (i *imlAPIKeyModule) Update(ctx context.Context, id string, input *system_apikey_dto.Update) error {
228 return i.transaction.Transaction(ctx, func(ctx context.Context) error {
229 err := i.apikeyService.Save(ctx, id, &system_apikey.Update{
230 Name: input.Name,
231 Value: input.Value,
232 Expired: input.Expired,
233 })
234 if err != nil {
235 return err
236 }
237 client, err := i.clusterServer.GatewayClient(ctx, cluster.DefaultClusterID)
238 if err != nil {
239 return err
240 }
241 return i.online(ctx, client)
242 })
243}
244
245func (i *imlAPIKeyModule) Delete(ctx context.Context, id string) error {
246 return i.transaction.Transaction(ctx, func(ctx context.Context) error {

Callers

nothing calls this directly

Calls 3

onlineMethod · 0.95
SaveMethod · 0.65
GatewayClientMethod · 0.65

Tested by

no test coverage detected