William Petit
8e574c299b
All checks were successful
arcad/edge/pipeline/pr-master This commit looks good
28 lines
555 B
Go
28 lines
555 B
Go
package share
|
|
|
|
import (
|
|
"context"
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/app"
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/share"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
type DeleteResourceArgs struct {
|
|
Origin app.ID
|
|
ResourceID share.ResourceID
|
|
}
|
|
|
|
type DeleteResourceReply struct {
|
|
}
|
|
|
|
func (s *Service) DeleteResource(ctx context.Context, args DeleteResourceArgs, reply *DeleteResourceReply) error {
|
|
if err := s.store.DeleteResource(ctx, args.Origin, args.ResourceID); err != nil {
|
|
return errors.WithStack(err)
|
|
}
|
|
|
|
*reply = DeleteResourceReply{}
|
|
|
|
return nil
|
|
}
|