2018-11-20 19:45:27 +00:00
|
|
|
import preserves
|
2019-09-11 14:00:27 +00:00
|
|
|
from preserves import Record
|
2018-11-20 19:45:27 +00:00
|
|
|
|
2019-05-16 11:46:22 +00:00
|
|
|
## Enrolment
|
|
|
|
Connect = Record.makeConstructor('Connect', 'scope')
|
|
|
|
|
2019-05-30 21:35:56 +00:00
|
|
|
## Bidirectional
|
2019-06-11 23:26:40 +00:00
|
|
|
Turn = Record.makeConstructor('Turn', 'items')
|
2019-05-30 21:35:56 +00:00
|
|
|
|
2019-05-16 11:46:22 +00:00
|
|
|
## Client -> Server
|
2018-11-20 19:45:27 +00:00
|
|
|
Assert = Record.makeConstructor('Assert', 'endpointName assertion')
|
|
|
|
Clear = Record.makeConstructor('Clear', 'endpointName')
|
|
|
|
Message = Record.makeConstructor('Message', 'body')
|
|
|
|
|
2019-05-16 11:46:22 +00:00
|
|
|
## Server -> Client
|
2018-11-20 19:45:27 +00:00
|
|
|
Add = Record.makeConstructor('Add', 'endpointName captures')
|
|
|
|
Del = Record.makeConstructor('Del', 'endpointName captures')
|
|
|
|
Msg = Record.makeConstructor('Msg', 'endpointName captures')
|
2019-06-07 14:06:18 +00:00
|
|
|
End = Record.makeConstructor('End', 'endpointName')
|
2019-06-11 23:26:40 +00:00
|
|
|
Err = Record.makeConstructor('Err', 'detail context')
|
2018-11-20 19:45:27 +00:00
|
|
|
|
2019-03-22 12:52:25 +00:00
|
|
|
## Bidirectional
|
|
|
|
Ping = Record.makeConstructor('Ping', '')
|
|
|
|
Pong = Record.makeConstructor('Pong', '')
|
|
|
|
|
2018-11-20 19:45:27 +00:00
|
|
|
## Standard Syndicate constructors
|
|
|
|
Observe = Record.makeConstructor('observe', 'specification')
|
|
|
|
Capture = Record.makeConstructor('capture', 'specification')
|
|
|
|
Discard = Record.makeConstructor('discard', '')
|
|
|
|
|
2020-07-22 08:06:47 +00:00
|
|
|
Decoder = preserves.Decoder
|
|
|
|
Encoder = preserves.Encoder
|