mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 10:12:06 +03:00
24 lines
332 B
Go
24 lines
332 B
Go
package bug
|
|
|
|
type OperationType int
|
|
|
|
const (
|
|
UNKNOW OperationType = iota
|
|
CREATE
|
|
SET_TITLE
|
|
ADD_COMMENT
|
|
)
|
|
|
|
type Operation interface {
|
|
OpType() OperationType
|
|
Apply(snapshot Snapshot) Snapshot
|
|
}
|
|
|
|
type OpBase struct {
|
|
OperationType OperationType `json:"op"`
|
|
}
|
|
|
|
func (op OpBase) OpType() OperationType {
|
|
return op.OperationType
|
|
}
|