summaryrefslogtreecommitdiff
path: root/cmd.go
blob: 7ba40e049be562f077d0721b2cef73b41db6106c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package libfastimport

import (
	"git.lukeshu.com/go/libfastimport/textproto"
)

type cmdClass int

const (
	cmdClassCommand cmdClass = 1 // may be a top-level command
	cmdClassCommit  cmdClass = 2 // may be used within in a commit

	cmdClassComment cmdClass = cmdClassCommand | cmdClassCommit
)

type Cmd interface {
	fiCmdWrite(*textproto.FIWriter) error
	fiCmdClass() cmdClass
}