mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-14 17:51:44 +03:00
25 lines
332 B
Go
25 lines
332 B
Go
package bug
|
|
|
|
type OperationType int
|
|
|
|
const (
|
|
_ OperationType = iota
|
|
CreateOp
|
|
SetTitleOp
|
|
AddCommentOp
|
|
SetStatusOp
|
|
)
|
|
|
|
type Operation interface {
|
|
OpType() OperationType
|
|
Apply(snapshot Snapshot) Snapshot
|
|
}
|
|
|
|
type OpBase struct {
|
|
OperationType OperationType
|
|
}
|
|
|
|
func (op OpBase) OpType() OperationType {
|
|
return op.OperationType
|
|
}
|