Documentation ¶
Index ¶
- func AddGetEmployeeCustomRouter(r *mux.Router, handler http.Handler) *mux.Router
- func DecodeGetEmployeeRequest(_ context.Context, r *http.Request) (request interface{}, err error)
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func MakeGetEmployeeCustomHandler(endpoint endpoint.Endpoint, dec httptransport.DecodeRequestFunc, ...) *httptransport.Server
- func MakeGetEmployeeEndpoint(s IService) endpoint.Endpoint
- func MakeGetEmployeeHandler(ep endpoint.Endpoint, options ...httptransport.ServerOption) *httptransport.Server
- func NewGetEmployeeCustomEndpoint(url *url.URL, enc httptransport.EncodeRequestFunc, ...) endpoint.Endpoint
- func NewGetEmployeeEndpoint(url *url.URL, options ...httptransport.ClientOption) endpoint.Endpoint
- func NewRouter(svc IService, options ...httptransport.ServerOption) *mux.Router
- type Client
- type ClientOption
- type Company
- type Employee
- type Endpoints
- type GetEmployeeRequest
- type GetEmployeeResp204
- type GetEmployeeResp400
- type GetEmployeeResp500
- type GetEmployeeResponse
- type IService
- type RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
func MakeGetEmployeeCustomHandler ¶
func MakeGetEmployeeCustomHandler(endpoint endpoint.Endpoint, dec httptransport.DecodeRequestFunc, enc httptransport.EncodeResponseFunc, options ...httptransport.ServerOption) *httptransport.Server
func MakeGetEmployeeEndpoint ¶
func MakeGetEmployeeHandler ¶
func MakeGetEmployeeHandler(ep endpoint.Endpoint, options ...httptransport.ServerOption) *httptransport.Server
func NewGetEmployeeCustomEndpoint ¶
func NewGetEmployeeCustomEndpoint(url *url.URL, enc httptransport.EncodeRequestFunc, dec httptransport.DecodeResponseFunc, options ...httptransport.ClientOption) endpoint.Endpoint
func NewGetEmployeeEndpoint ¶
func NewGetEmployeeEndpoint(url *url.URL, options ...httptransport.ClientOption) endpoint.Endpoint
func NewRouter ¶
func NewRouter(svc IService, options ...httptransport.ServerOption) *mux.Router
Types ¶
type Client ¶
func NewHTTPClient ¶
func NewHTTPClient(baseURL string, options ...ClientOption) (*Client, error)
func (*Client) GetEmployee ¶
func (c *Client) GetEmployee(ctx context.Context, req GetEmployeeRequest, options ...RequestOption) (*Employee, error)
method name given from operationId parameter
type ClientOption ¶
type ClientOption func(c *Client)
type Endpoints ¶
func MakeEndoints ¶
type GetEmployeeRequest ¶
type GetEmployeeRequest struct {
Phone string `json:"phone"`
}
type GetEmployeeResp204 ¶
type GetEmployeeResp204 struct{}
func (*GetEmployeeResp204) Error ¶
func (e *GetEmployeeResp204) Error() string
type GetEmployeeResp400 ¶
func (*GetEmployeeResp400) Error ¶
func (e *GetEmployeeResp400) Error() string
type GetEmployeeResp500 ¶
type GetEmployeeResp500 struct{}
func (*GetEmployeeResp500) Error ¶
func (e *GetEmployeeResp500) Error() string
type GetEmployeeResponse ¶
type GetEmployeeResponse struct { Employee Employee `json:"employee,omitempty"` Err error `json:"err,omitempty"` }
func (*GetEmployeeResponse) Error ¶
func (r *GetEmployeeResponse) Error() error
type RequestOption ¶
Click to show internal directories.
Click to hide internal directories.