...
This commit is contained in:
@@ -23,6 +23,7 @@ pub mut:
|
||||
pub fn (self Calendar) type_name() string {
|
||||
return 'calendar'
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Calendar) description(methodname string) string {
|
||||
match methodname {
|
||||
|
||||
@@ -66,6 +66,29 @@ pub mut:
|
||||
pub fn (self ChatMessage) type_name() string {
|
||||
return 'chat_message'
|
||||
}
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self ChatMessage) description(methodname string) string {
|
||||
match methodname {
|
||||
'set' {
|
||||
return 'Create or update a chat message. Returns the ID of the message.'
|
||||
}
|
||||
'get' {
|
||||
return 'Retrieve a chat message by ID. Returns the message object.'
|
||||
}
|
||||
'delete' {
|
||||
return 'Delete a chat message by ID. Returns true if successful.'
|
||||
}
|
||||
'exist' {
|
||||
return 'Check if a chat message exists by ID. Returns true or false.'
|
||||
}
|
||||
'list' {
|
||||
return 'List all chat messages. Returns an array of message objects.'
|
||||
}
|
||||
else {
|
||||
return 'This is generic method for the root object, TODO fill in, ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self ChatMessage) example(methodname string) (string, string) {
|
||||
|
||||
@@ -25,6 +25,29 @@ pub mut:
|
||||
pub fn (self Comment) type_name() string {
|
||||
return 'comments'
|
||||
}
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Comment) description(methodname string) string {
|
||||
match methodname {
|
||||
'set' {
|
||||
return 'Create or update a comment. Returns the ID of the comment.'
|
||||
}
|
||||
'get' {
|
||||
return 'Retrieve a comment by ID. Returns the comment object.'
|
||||
}
|
||||
'delete' {
|
||||
return 'Delete a comment by ID. Returns true if successful.'
|
||||
}
|
||||
'exist' {
|
||||
return 'Check if a comment exists by ID. Returns true or false.'
|
||||
}
|
||||
'list' {
|
||||
return 'List all comments. Returns an array of comment objects.'
|
||||
}
|
||||
else {
|
||||
return 'This is generic method for the root object, TODO fill in, ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Comment) example(methodname string) (string, string) {
|
||||
|
||||
@@ -32,6 +32,29 @@ pub enum GroupRole {
|
||||
pub fn (self Group) type_name() string {
|
||||
return 'group'
|
||||
}
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Group) description(methodname string) string {
|
||||
match methodname {
|
||||
'set' {
|
||||
return 'Create or update a group. Returns the ID of the group.'
|
||||
}
|
||||
'get' {
|
||||
return 'Retrieve a group by ID. Returns the group object.'
|
||||
}
|
||||
'delete' {
|
||||
return 'Delete a group by ID. Returns true if successful.'
|
||||
}
|
||||
'exist' {
|
||||
return 'Check if a group exists by ID. Returns true or false.'
|
||||
}
|
||||
'list' {
|
||||
return 'List all groups. Returns an array of group objects.'
|
||||
}
|
||||
else {
|
||||
return 'This is generic method for the root object, TODO fill in, ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Group) example(methodname string) (string, string) {
|
||||
|
||||
@@ -52,6 +52,29 @@ pub mut:
|
||||
pub fn (self Project) type_name() string {
|
||||
return 'project'
|
||||
}
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Project) description(methodname string) string {
|
||||
match methodname {
|
||||
'set' {
|
||||
return 'Create or update a project. Returns the ID of the project.'
|
||||
}
|
||||
'get' {
|
||||
return 'Retrieve a project by ID. Returns the project object.'
|
||||
}
|
||||
'delete' {
|
||||
return 'Delete a project by ID. Returns true if successful.'
|
||||
}
|
||||
'exist' {
|
||||
return 'Check if a project exists by ID. Returns true or false.'
|
||||
}
|
||||
'list' {
|
||||
return 'List all projects. Returns an array of project objects.'
|
||||
}
|
||||
else {
|
||||
return 'This is generic method for the root object, TODO fill in, ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self Project) example(methodname string) (string, string) {
|
||||
|
||||
@@ -61,6 +61,29 @@ pub mut:
|
||||
pub fn (self ProjectIssue) type_name() string {
|
||||
return 'project_issue'
|
||||
}
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self ProjectIssue) description(methodname string) string {
|
||||
match methodname {
|
||||
'set' {
|
||||
return 'Create or update a project issue. Returns the ID of the issue.'
|
||||
}
|
||||
'get' {
|
||||
return 'Retrieve a project issue by ID. Returns the issue object.'
|
||||
}
|
||||
'delete' {
|
||||
return 'Delete a project issue by ID. Returns true if successful.'
|
||||
}
|
||||
'exist' {
|
||||
return 'Check if a project issue exists by ID. Returns true or false.'
|
||||
}
|
||||
'list' {
|
||||
return 'List all project issues. Returns an array of issue objects.'
|
||||
}
|
||||
else {
|
||||
return 'This is generic method for the root object, TODO fill in, ...'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// return example rpc call and result for each methodname
|
||||
pub fn (self ProjectIssue) example(methodname string) (string, string) {
|
||||
|
||||
2
lib/hero/server/readme.md
Normal file
2
lib/hero/server/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
this will be the main server which acts as gateway to heromodels and other rpc backend services.
|
||||
|
||||
Reference in New Issue
Block a user