// Echo implements the Oneway::Echo procedure.
515001
func (t *thriftHandler) Echo(ctx context.Context, Token *string) error {
	callBackAddr := yarpc.CallFromContext(ctx).Header(callBackAddrHeader)
	t.callHome(ctx, callBackAddr, []byte(*Token), thrift.Encoding)
	return nil
}
73363
func (pool *Pool) Echo(addr string, data []byte) (echo []byte, err error) {
	var client *PoolClient
	if addr == "" {
		client = pool.selectServer()
	} else {
		var ok bool
		if client, ok = pool.Clients[addr]; !ok {
			err = ErrNotFound
			return
		}
	}
	client.Lock()
	defer client.Unlock()
	echo, err = client.Echo(data)
	return
}
645075
func (e *Echo) URI(handler HandlerFunc, params ...interface{}) string {
	name := handlerName(handler)
	return e.Reverse(name, params...)
}
1335187
func (s *Shell) Execute(command string, arguments ...string) (*Command, error) {
	request := NewExecuteCommandRequest(s.client.url, s.id, command, arguments, &s.client.Parameters)
	defer request.Free()

	response, err := s.client.sendRequest(request)
	if err != nil {
		return nil, err
	}

	commandID, err := ParseExecuteCommandResponse(response)
	if err != nil {
		return nil, err
	}

	cmd := newCommand(s, commandID)

	return cmd, nil
}
920074
func (v *Echo_Echo_Args) Equals(rhs *Echo_Echo_Args) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Ping == nil && rhs.Ping == nil) || (v.Ping != nil && rhs.Ping != nil && v.Ping.Equals(rhs.Ping))) {
		return false
	}

	return true
}
708789
func (v *Oneway_Echo_Args) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Token != nil {
		fields[i] = fmt.Sprintf("Token: %v", *(v.Token))
		i++
	}

	return fmt.Sprintf("Oneway_Echo_Args{%v}", strings.Join(fields[:i], ", "))
}
847665
func (c *Client) Echo(message string) (string, error) {
	v, err := c.execWithKey(true, "ECHO", message)
	if err != nil {
		return "", err
	}
	return iface2str(v)
}
70654
func (t *Template) Exec(name string, context ...interface{}) (string, error) {
	ctx := t.defaultCtx
	if len(context) == 1 {
		ctx = context[0]
	}
	tmpl := t.root.Lookup(name)
	if tmpl == nil {
		return "", errors.Errorf(`template "%s" not defined`, name)
	}
	return render(tmpl, ctx)
}
440187
func (e *Echo) Post(path string, h interface{}, m ...interface{}) {
	e.add(POST, "", path, h, m...)
}
71865
func EchoHandler() http.Handler {
	e := echo.New()

	e.POST("/login", func(ctx echo.Context) error {
		username := ctx.FormValue("username")
		password := ctx.FormValue("password")

		if username == "ford" && password == "betelgeuse7" {
			// create token
			token := jwt.New(jwt.SigningMethodHS256)

			// generate encoded token and send it as response
			t, err := token.SignedString([]byte("secret"))
			if err != nil {
				return err
			}
			return ctx.JSON(http.StatusOK, map[string]string{
				"token": t,
			})
		}

		return echo.ErrUnauthorized
	})

	r := e.Group("/restricted")

	r.Use(middleware.JWT([]byte("secret")))

	r.GET("/hello", func(ctx echo.Context) error {
		return ctx.String(http.StatusOK, "hello, world!")
	})

	return e
}
648664
func (m *MockBuildsServer) Batch(arg0 context.Context, arg1 *BatchRequest) (*BatchResponse, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Batch", arg0, arg1)
	ret0, _ := ret[0].(*BatchResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
711893
func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route {
	return e.file(path, file, e.GET, m...)
}
1044311
func (r *T) Exec(args ...string) (string, error) {
	args = append(r.Args[:], args...)
	return r.RawExec(args...)
}
476823
func (l *Linode) Batch(action string, params Parameters, result interface{}) {
	params.Set(apiAction, action)
	l.actions = append(l.actions, Action{
		parameters: params,
		result:     result,
	})
}
767818
func (b *Batch) Flush() (err error) {
	if b.Size() == 0 {
		return nil
	}

	buf, err := b.Bytes()
	if err != nil {
		return err
	}

	b.Docs = nil

	return b.Elastic.Bulk(buf)
}
1360182
func (e *Echo) Close() error {
	if err := e.TLSServer.Close(); err != nil {
		return err
	}
	return e.Server.Close()
}
829196
func (e *Echo) Use(middleware ...interface{}) {
	for _, m := range middleware {
		e.ValidMiddleware(m)
		e.middleware = append(e.middleware, m)
		if e.MiddlewareDebug {
			e.logger.Debugf(`Middleware[Use](%p): [] -> %s `, m, HandlerName(m))
		}
	}
}