diff options
Diffstat (limited to 'bug/operation.go')
-rw-r--r-- | bug/operation.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bug/operation.go b/bug/operation.go index f42a1192..bb88af1f 100644 --- a/bug/operation.go +++ b/bug/operation.go @@ -21,6 +21,7 @@ const ( SetStatusOp LabelChangeOp EditCommentOp + NoOpOp ) // Operation define the interface to fulfill for an edit operation of a Bug @@ -43,6 +44,8 @@ type Operation interface { SetMetadata(key string, value string) // GetMetadata retrieve arbitrary metadata about the operation GetMetadata(key string) (string, bool) + // AllMetadata return all metadata for this operation + AllMetadata() map[string]string } func hashRaw(data []byte) git.Hash { @@ -145,3 +148,8 @@ func (op *OpBase) GetMetadata(key string) (string, bool) { val, ok := op.Metadata[key] return val, ok } + +// AllMetadata return all metadata for this operation +func (op *OpBase) AllMetadata() map[string]string { + return op.Metadata +} |