3
0
Files
corteza/messaging/rest/commands.go
Denis Arh 243052402d More flexible "messaging", move to Corteza
- more control over starting procedure, cli commands...
 - fix package paths
 - renaming symbols, comments, strings from Crust to Corteza
2019-05-24 12:42:04 +02:00

38 lines
812 B
Go

package rest
import (
"context"
"github.com/pkg/errors"
"github.com/cortezaproject/corteza-server/messaging/rest/request"
"github.com/cortezaproject/corteza-server/messaging/types"
)
var _ = errors.Wrap
type Commands struct {
// xxx service.XXXService
}
func (Commands) New() *Commands {
return &Commands{}
}
func (ctrl *Commands) List(ctx context.Context, r *request.CommandsList) (interface{}, error) {
return types.CommandSet{
&types.Command{
Name: "me",
Description: "Illeism"},
&types.Command{
Name: "shrug",
Description: "It does exactly what it says on the tin"},
&types.Command{
Name: "tableflip",
Description: "Flatten a table in anger"},
&types.Command{
Name: "unflip",
Description: "Put the table back from a flip"},
}, nil
}