Commit a944b54e authored by Craig Squire's avatar Craig Squire

Also add custom attributes for projects and users

parent 2700a1ea
......@@ -86,9 +86,10 @@ type Project struct {
GroupName string `json:"group_name"`
GroupAccessLevel int `json:"group_access_level"`
} `json:"shared_with_groups"`
Statistics *ProjectStatistics `json:"statistics"`
Links *Links `json:"_links,omitempty"`
CIConfigPath *string `json:"ci_config_path"`
Statistics *ProjectStatistics `json:"statistics"`
Links *Links `json:"_links,omitempty"`
CIConfigPath *string `json:"ci_config_path"`
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
}
// Repository represents a repository.
......@@ -195,6 +196,7 @@ type ListProjectsOptions struct {
WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"`
WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"`
MinAccessLevel *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"`
WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}
// ListProjects gets a list of projects accessible by the authenticated user.
......
......@@ -34,38 +34,39 @@ type UsersService struct {
//
// GitLab API docs: https://docs.gitlab.com/ee/api/users.html
type User struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Name string `json:"name"`
State string `json:"state"`
CreatedAt *time.Time `json:"created_at"`
Bio string `json:"bio"`
Location string `json:"location"`
PublicEmail string `json:"public_email"`
Skype string `json:"skype"`
Linkedin string `json:"linkedin"`
Twitter string `json:"twitter"`
WebsiteURL string `json:"website_url"`
Organization string `json:"organization"`
ExternUID string `json:"extern_uid"`
Provider string `json:"provider"`
ThemeID int `json:"theme_id"`
LastActivityOn *ISOTime `json:"last_activity_on"`
ColorSchemeID int `json:"color_scheme_id"`
IsAdmin bool `json:"is_admin"`
AvatarURL string `json:"avatar_url"`
CanCreateGroup bool `json:"can_create_group"`
CanCreateProject bool `json:"can_create_project"`
ProjectsLimit int `json:"projects_limit"`
CurrentSignInAt *time.Time `json:"current_sign_in_at"`
LastSignInAt *time.Time `json:"last_sign_in_at"`
ConfirmedAt *time.Time `json:"confirmed_at"`
TwoFactorEnabled bool `json:"two_factor_enabled"`
Identities []*UserIdentity `json:"identities"`
External bool `json:"external"`
PrivateProfile bool `json:"private_profile"`
SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"`
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Name string `json:"name"`
State string `json:"state"`
CreatedAt *time.Time `json:"created_at"`
Bio string `json:"bio"`
Location string `json:"location"`
PublicEmail string `json:"public_email"`
Skype string `json:"skype"`
Linkedin string `json:"linkedin"`
Twitter string `json:"twitter"`
WebsiteURL string `json:"website_url"`
Organization string `json:"organization"`
ExternUID string `json:"extern_uid"`
Provider string `json:"provider"`
ThemeID int `json:"theme_id"`
LastActivityOn *ISOTime `json:"last_activity_on"`
ColorSchemeID int `json:"color_scheme_id"`
IsAdmin bool `json:"is_admin"`
AvatarURL string `json:"avatar_url"`
CanCreateGroup bool `json:"can_create_group"`
CanCreateProject bool `json:"can_create_project"`
ProjectsLimit int `json:"projects_limit"`
CurrentSignInAt *time.Time `json:"current_sign_in_at"`
LastSignInAt *time.Time `json:"last_sign_in_at"`
ConfirmedAt *time.Time `json:"confirmed_at"`
TwoFactorEnabled bool `json:"two_factor_enabled"`
Identities []*UserIdentity `json:"identities"`
External bool `json:"external"`
PrivateProfile bool `json:"private_profile"`
SharedRunnersMinutesLimit int `json:"shared_runners_minutes_limit"`
CustomAttributes []*CustomAttribute `json:"custom_attributes"`
}
// UserIdentity represents a user identity.
......@@ -83,14 +84,15 @@ type ListUsersOptions struct {
Blocked *bool `url:"blocked,omitempty" json:"blocked,omitempty"`
// The options below are only available for admins.
Search *string `url:"search,omitempty" json:"search,omitempty"`
Username *string `url:"username,omitempty" json:"username,omitempty"`
ExternalUID *string `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
Provider *string `url:"provider,omitempty" json:"provider,omitempty"`
CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
Username *string `url:"username,omitempty" json:"username,omitempty"`
ExternalUID *string `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
Provider *string `url:"provider,omitempty" json:"provider,omitempty"`
CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
Sort *string `url:"sort,omitempty" json:"sort,omitempty"`
WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}
// ListUsers gets a list of users.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment