William Petit
8e574c299b
All checks were successful
arcad/edge/pipeline/pr-master This commit looks good
27 lines
510 B
Go
27 lines
510 B
Go
package document
|
|
|
|
import (
|
|
"context"
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
type DeleteDocumentArgs struct {
|
|
Collection string
|
|
DocumentID storage.DocumentID
|
|
}
|
|
|
|
type DeleteDocumentReply struct {
|
|
}
|
|
|
|
func (s *Service) DeleteDocument(ctx context.Context, args DeleteDocumentArgs, reply *DeleteDocumentReply) error {
|
|
if err := s.store.Delete(ctx, args.Collection, args.DocumentID); err != nil {
|
|
return errors.WithStack(err)
|
|
}
|
|
|
|
*reply = DeleteDocumentReply{}
|
|
|
|
return nil
|
|
}
|