Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is a singleton client for Yandex.Taxi API
func (*API) DisableUser ¶
DisableUser makes it impossible for user to call a taxi
func (*API) EnableUser ¶
EnableUser makes it possible for user to call a taxi
func (API) GetUsersByRole ¶
GetUsersByRole fetches all existing users and then filters them by role from Yandex.Taxi API
type Restriction ¶
type Restriction struct { Days []string `json:"days,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` Type string `json:"type,omitempty"` }
Restriction is an element of a role that makes coding slightly easier
type RoleResponse ¶
type RoleResponse struct {
Items []Role `json:"items"`
}
RoleResponse is Yandex.Taxi API DTO for roles
type User ¶
type User struct { ID string `json:"_id,omitempty"` Name string `json:"fullname"` Phone string `json:"phone"` Email string `json:"email"` Nickname string `json:"nickname"` CostCenter string `json:"cost_center"` IsActive bool `json:"is_active"` Role struct { ID string `json:"role_id,omitempty"` Name string `json:"name,omitempty"` Limit float32 `json:"limit,omitempty"` Classes []string `json:"classes,omitempty"` NoSpecificLimit bool `json:"no_specific_limit,omitempty"` Restrictions []Restriction `json:"restrictions,omitempty"` } `json:"role"` }
User is a single Yandex.Taxi user
type UserResponse ¶
type UserResponse struct {
Items []User `json:"items"`
}
UserResponse is Yandex.Taxi API DTO for users
Click to show internal directories.
Click to hide internal directories.