SetMetadata is a convenience function to add metadata on another operation
(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string)
| 12 | |
| 13 | // SetMetadata is a convenience function to add metadata on another operation |
| 14 | func SetMetadata(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) (*dag.SetMetadataOperation[*Snapshot], error) { |
| 15 | op := NewSetMetadataOp(author, unixTime, target, newMetadata) |
| 16 | if err := op.Validate(); err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | b.Append(op) |
| 20 | return op, nil |
| 21 | } |
no test coverage detected