MCPcopy
hub / github.com/wavetermdev/waveterm / DeleteBlock

Method DeleteBlock

pkg/service/objectservice/objectservice.go:104–113  ·  view source on GitHub ↗
(uiContext waveobj.UIContext, blockId string)

Source from the content-addressed store, hash-verified

102}
103
104func (svc *ObjectService) DeleteBlock(uiContext waveobj.UIContext, blockId string) (waveobj.UpdatesRtnType, error) {
105 ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
106 defer cancelFn()
107 ctx = waveobj.ContextWithUpdates(ctx)
108 err := wcore.DeleteBlock(ctx, blockId, true)
109 if err != nil {
110 return nil, fmt.Errorf("error deleting block: %w", err)
111 }
112 return waveobj.ContextGetUpdatesRtn(ctx), nil
113}
114
115func (svc *ObjectService) UpdateObjectMeta_Meta() tsgenmeta.MethodMeta {
116 return tsgenmeta.MethodMeta{

Callers

nothing calls this directly

Calls 3

ContextWithUpdatesFunction · 0.92
DeleteBlockFunction · 0.92
ContextGetUpdatesRtnFunction · 0.92

Tested by

no test coverage detected