Ejemplo n.º 1
0
// Run makes the HTTP request corresponding to the MultiplyOperandsCommand command.
func (cmd *MultiplyOperandsCommand) Run(c *client.Client, args []string) error {
	var path string
	if len(args) > 0 {
		path = args[0]
	} else {
		return fmt.Errorf("missing path argument")
	}
	resp, err := c.MultiplyOperands(path)
	if err != nil {
		return err
	}
	HandleResponse(c, resp)
	return nil
}
Ejemplo n.º 2
0
// Run makes the HTTP request corresponding to the CallbackResponseFromGoogleAuthenticationCommand command.
func (cmd *CallbackResponseFromGoogleAuthenticationCommand) Run(c *client.Client, args []string) error {
	var path string
	if len(args) > 0 {
		path = args[0]
	} else {
		path = "/GoogleCallback"
	}
	resp, err := c.CallbackResponseFromGoogleAuthentication(path)
	if err != nil {
		return err
	}
	HandleResponse(c, resp)
	return nil
}
Ejemplo n.º 3
0
// Run makes the HTTP request corresponding to the LogIntoGithubAuthenticationCommand command.
func (cmd *LogIntoGithubAuthenticationCommand) Run(c *client.Client, args []string) error {
	var path string
	if len(args) > 0 {
		path = args[0]
	} else {
		path = "/GithubLogin"
	}
	resp, err := c.LogIntoGithubAuthentication(path)
	if err != nil {
		return err
	}
	HandleResponse(c, resp)
	return nil
}