Documentation
¶
Index ¶
Constants ¶
View Source
const ( SuccessStatusCode = 0 ErrorStatusCode = 1 )
constants
Variables ¶
View Source
var DefaultHandlerMap = map[string]http.Handler{ "/v1/estimate-time": http.HandlerFunc(estimateHandler), "/v1/users": http.HandlerFunc(updateUserHandler), }
DefaultHandlerMap default url and handler map
Functions ¶
func TestNewMux ¶
TestNewMux creates mux for test/dev server
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client api client
func (*Client) EstimateTimeToComplete ¶
EstimateTimeToComplete estimate time to complete
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, req *UpdateUserRequest) (*UpdateUserResponse, error)
UpdateUser update ETC user info
type Config ¶
type Config struct { BaseEndpoint string `toml:"base_endpoint"` APIKey string `toml:"api_key"` APISecret string `toml:"api_secret"` Debug bool `toml:"debug"` }
Config api client config
type ETCResponse ¶
type ETCResponse struct { StatusCode int `json:"statusCode"` Message int `json:"message,omitempty"` Time int `json:"time,omitempty"` ConfidenceLevel int `json:"confidenceLevel,omitempty"` }
ETCResponse estimated time to complete
type UpdateUserRequest ¶
type UpdateUserRequest struct { ID string `json:"id"` UserName string `json:"userName"` Email string `json:"email"` }
UpdateUserRequest update ETC user request
Click to show internal directories.
Click to hide internal directories.