Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetConfig = &request.Config{ Action: "GET", Resource: "users/:id", Headers: map[string]string{ "Content-Type": "application/json", }, }
View Source
var ListALLConfig = &request.Config{ Action: "GET", Resource: "users", Headers: map[string]string{ "Content-Type": "application/json", }, }
View Source
var ListConfig = &request.Config{ Action: "GET", Resource: "users", Headers: map[string]string{ "Content-Type": "application/json", }, }
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
type GetRequest struct {
ID uint `json:"id"`
}
type GetResponse ¶
type GetResponse = User
func Get ¶
func Get(client client.Client, opts ...func(opt *GetRequest)) (*GetResponse, error)
type ListALLRequest ¶ added in v0.0.6
type ListALLResponse ¶ added in v0.0.6
func ListALL ¶ added in v0.0.6
func ListALL(client client.Client, opts ...func(opt *ListALLRequest)) (*ListALLResponse, error)
type ListRequest ¶
type ListResponse ¶
func List ¶
func List(client client.Client, opts ...func(opt *ListRequest)) (*ListResponse, error)
type User ¶
type User struct { ID uint `json:"id"` Username string `json:"username"` Name string `json:"name"` State string `json:"state"` AvatarURL string `json:"avatar_url"` WebURL string `json:"web_url"` CreatedAt string `json:"created_at"` IsAdmin bool `json:"is_admin"` Bio string `json:"bio"` Location string `json:"location"` Skype string `json:"skype"` Linkedin string `json:"linkedin"` Twitter string `json:"twitter"` WebsiteURL string `json:"website_url"` Organization string `json:"organization"` LastSignInAt string `json:"last_sign_in_at"` ConfirmedAt string `json:"confirmed_at"` ThemeID int64 `json:"theme_id"` LastActivityOn string `json:"last_activity_on"` ColorSchemeID int64 `json:"color_scheme_id"` ProjectsLimit int64 `json:"projects_limit"` CurrentSignInAt string `json:"current_sign_in_at"` Identities []struct { Provider string `json:"provider"` ExternUID string `json:"extern_uid"` } `json:"identities"` CanCreateGroup bool `json:"can_create_group"` CanCreateProject bool `json:"can_create_project"` TwoFactorEnabled bool `json:"two_factor_enabled"` External bool `json:"external"` PrivateProfile bool `json:"private_profile"` }
type UserImpl ¶
type UserImpl interface { List(opts ...func(opt *ListRequest)) (*ListResponse, error) Get(opts ...func(opt *GetRequest)) (*GetResponse, error) // ListALL(opts ...func(opt *ListALLRequest)) (*ListALLResponse, error) }
Click to show internal directories.
Click to hide internal directories.