Start sketching system protocols
This commit is contained in:
parent
e4048cfbef
commit
1830249a67
3 changed files with 35 additions and 0 deletions
8
protocols/Makefile
Normal file
8
protocols/Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
all: schema-bundle.bin
|
||||
|
||||
clean:
|
||||
rm -f schema-bundle.bin
|
||||
|
||||
schema-bundle.bin: schemas/*.prs
|
||||
preserves-schemac schemas/*.prs > $@.tmp
|
||||
mv $@.tmp $@
|
1
protocols/schema-bundle.bin
Normal file
1
protocols/schema-bundle.bin
Normal file
|
@ -0,0 +1 @@
|
|||
´³bundle·µ³users-and-groups„´³schema·³version‘³definitions·³Spec´³orµµ±userAccount´³lit³user„„µ±
systemAccount´³lit³system„„µ±id´³atom³
SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³
SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³
SignedInteger„„³uid´³named³uid´³atom³
SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³EnsureGroup´³rec´³lit³ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³GroupMember´³rec´³lit³group-member„´³tupleµ´³named³uid´³atom³
SignedInteger„„´³named³gid´³atom³
SignedInteger„„„„„³
EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³embeddedType€„„„„
|
26
protocols/schemas/users-and-groups.prs
Normal file
26
protocols/schemas/users-and-groups.prs
Normal file
|
@ -0,0 +1,26 @@
|
|||
version 1 .
|
||||
|
||||
Account = <pwent {
|
||||
name: string,
|
||||
uid: int,
|
||||
gid: int,
|
||||
info: string,
|
||||
home: string,
|
||||
shell: string,
|
||||
}> .
|
||||
|
||||
Group = <grent {
|
||||
name: string,
|
||||
gid: int,
|
||||
}> .
|
||||
|
||||
GroupMember = <group-member @uid int @gid int> .
|
||||
|
||||
EnsureAccount = <ensure-account @name string @spec Spec> .
|
||||
EnsureGroup = <ensure-group @name string @spec Spec> .
|
||||
|
||||
Spec =
|
||||
/ @userAccount =user
|
||||
/ @systemAccount =system
|
||||
/ @id int
|
||||
.
|
Loading…
Reference in a new issue