-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstates.go
27 lines (23 loc) · 995 Bytes
/
states.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package gotr4
type convState interface {
next()
String() string
}
type stateStart struct{}
type stateWaitingAuthR struct{}
type stateWaitingAuthI struct{}
type stateWaitingDakeDataMessage struct{}
type stateEncrypted struct{}
type stateFinished struct{}
func (stateStart) next() {}
func (stateWaitingAuthR) next() {}
func (stateWaitingAuthI) next() {}
func (stateWaitingDakeDataMessage) next() {}
func (stateEncrypted) next() {}
func (stateFinished) next() {}
func (stateStart) String() string { return "START" }
func (stateWaitingAuthR) String() string { return "WAITING_AUTH_R" }
func (stateWaitingAuthI) String() string { return "WAITING_AUTH_I" }
func (stateWaitingDakeDataMessage) String() string { return "WAITING_DAKE_DATA_MESSAGE" }
func (stateEncrypted) String() string { return "ENCRYPTED" }
func (stateFinished) String() string { return "FINISHED" }