3
0

spec update

This commit is contained in:
Tit Petric 2018-07-06 09:31:40 +00:00
parent ef46e643af
commit 593edff9b5
7 changed files with 170 additions and 109 deletions

View File

@ -6,8 +6,13 @@
"entrypoint": "organisation",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "name": "ID", "type": "uint64" },
{ "name": "Name", "type": "string" }
{
"name": "Organisation",
"fields": [
{ "name": "ID", "type": "uint64" },
{ "name": "Name", "type": "string" }
]
}
],
"apis": [
{
@ -70,10 +75,15 @@
"entrypoint": "team",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Name" },
{ "type": "[]uint64", "name": "MemberIDs", "tag": "json:\"-\"", "complex": true },
{ "type": "[]User", "name": "Members", "tag": "json:\",omitempty\"", "complex": true }
{
"name": "Team",
"fields": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Name" },
{ "type": "[]uint64", "name": "MemberIDs", "tag": "json:\"-\"", "complex": true },
{ "type": "[]User", "name": "Members", "tag": "json:\",omitempty\"", "complex": true }
]
}
],
"apis": [
{
@ -159,9 +169,14 @@
"entrypoint": "channel",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Name" },
{ "type": "string", "name": "Topic" }
{
"name": "Channel",
"fields": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Name" },
{ "type": "string", "name": "Topic" }
]
}
],
"apis": [
{
@ -234,15 +249,20 @@
"entrypoint": "message",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "name": "Service", "type": "string" },
{ "name": "Channel", "type": "string" },
{ "name": "UserName", "type": "string" },
{ "name": "UserID", "type": "uint64" },
{ "name": "User", "type": "*User" },
{ "name": "UserAvatar", "type": "string" },
{ "name": "Message", "type": "string" },
{ "name": "MessageID", "type": "string" },
{ "name": "Type", "type": "MessageType" }
{
"name": "Message",
"fields": [
{ "name": "Service", "type": "string" },
{ "name": "Channel", "type": "string" },
{ "name": "UserName", "type": "string" },
{ "name": "UserID", "type": "uint64" },
{ "name": "User", "type": "*User", "complex": true },
{ "name": "UserAvatar", "type": "string" },
{ "name": "Message", "type": "string" },
{ "name": "MessageID", "type": "string" },
{ "name": "Type", "type": "MessageType" }
]
}
],
"apis": [
{
@ -333,9 +353,14 @@
"entrypoint": "user",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Username" },
{ "type": "string", "name": "Password", "tag": "json:\"-\"" }
{
"name": "User",
"fields": [
{ "type": "uint64", "name": "ID" },
{ "type": "string", "name": "Username" },
{ "type": "string", "name": "Password", "tag": "json:\"-\"" }
]
}
],
"apis": [
{
@ -368,8 +393,13 @@
"protocol": "WebSockets",
"authentication": ["Client ID", "Session ID"],
"struct": [
{ "type": "uint64", "name": "UserID" },
{ "type": "User", "name": "User", "complex": true }
{
"name": "WebSocket",
"fields": [
{ "type": "uint64", "name": "UserID" },
{ "type": "User", "name": "User", "complex": true }
]
}
],
"apis": [
{

View File

@ -5,16 +5,21 @@
"Interface": "Channel",
"Struct": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"name": "Topic",
"type": "string"
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"name": "Topic",
"type": "string"
}
],
"name": "Channel"
}
],
"Protocol": "",

View File

@ -4,40 +4,46 @@
"Interface": "Message",
"Struct": [
{
"name": "Service",
"type": "string"
},
{
"name": "Channel",
"type": "string"
},
{
"name": "UserName",
"type": "string"
},
{
"name": "UserID",
"type": "uint64"
},
{
"name": "User",
"type": "*User"
},
{
"name": "UserAvatar",
"type": "string"
},
{
"name": "Message",
"type": "string"
},
{
"name": "MessageID",
"type": "string"
},
{
"name": "Type",
"type": "MessageType"
"fields": [
{
"name": "Service",
"type": "string"
},
{
"name": "Channel",
"type": "string"
},
{
"name": "UserName",
"type": "string"
},
{
"name": "UserID",
"type": "uint64"
},
{
"complex": true,
"name": "User",
"type": "*User"
},
{
"name": "UserAvatar",
"type": "string"
},
{
"name": "Message",
"type": "string"
},
{
"name": "MessageID",
"type": "string"
},
{
"name": "Type",
"type": "MessageType"
}
],
"name": "Message"
}
],
"Protocol": "",

View File

@ -5,12 +5,17 @@
"Interface": "Organisation",
"Struct": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
}
],
"name": "Organisation"
}
],
"Protocol": "",

View File

@ -5,24 +5,29 @@
"Interface": "Team",
"Struct": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"complex": true,
"name": "MemberIDs",
"tag": "json:\"-\"",
"type": "[]uint64"
},
{
"complex": true,
"name": "Members",
"tag": "json:\",omitempty\"",
"type": "[]User"
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Name",
"type": "string"
},
{
"complex": true,
"name": "MemberIDs",
"tag": "json:\"-\"",
"type": "[]uint64"
},
{
"complex": true,
"name": "Members",
"tag": "json:\",omitempty\"",
"type": "[]User"
}
],
"name": "Team"
}
],
"Protocol": "",

View File

@ -4,17 +4,22 @@
"Interface": "User",
"Struct": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Username",
"type": "string"
},
{
"name": "Password",
"tag": "json:\"-\"",
"type": "string"
"fields": [
{
"name": "ID",
"type": "uint64"
},
{
"name": "Username",
"type": "string"
},
{
"name": "Password",
"tag": "json:\"-\"",
"type": "string"
}
],
"name": "User"
}
],
"Protocol": "",

View File

@ -4,13 +4,18 @@
"Interface": "Websocket",
"Struct": [
{
"name": "UserID",
"type": "uint64"
},
{
"complex": true,
"name": "User",
"type": "User"
"fields": [
{
"name": "UserID",
"type": "uint64"
},
{
"complex": true,
"name": "User",
"type": "User"
}
],
"name": "WebSocket"
}
],
"Protocol": "WebSockets",