github.com/altipla-consulting/ravendb-go-client@v0.1.3/delete_command_data.go (about) 1 package ravendb 2 3 // DeleteCommandData represents data for delete command 4 type DeleteCommandData struct { 5 CommandData 6 } 7 8 // NewDeleteCommandData creates ICommandData for Delete command 9 func NewDeleteCommandData(id string, changeVector string) ICommandData { 10 var changeVectorPtr *string 11 if changeVector != "" { 12 changeVectorPtr = &changeVector 13 } 14 res := &DeleteCommandData{ 15 CommandData{ 16 Type: CommandDelete, 17 ID: id, 18 ChangeVector: changeVectorPtr, 19 }, 20 } 21 return res 22 } 23 24 func (d *DeleteCommandData) serialize(conventions *DocumentConventions) (interface{}, error) { 25 return d.baseJSON(), nil 26 }