aboutsummaryrefslogblamecommitdiffstats
path: root/bug/operation.go
blob: c9e7a555060d563221c5033c1bddc2a0af36f735 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
           



                      




                              



                              
                                         
 

                    
                                   




                                         
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
}