Update dependencies and build to go1.22 (#2113)
* Update dependencies and build to go1.22 * Fix api changes wrt to dependencies * Update golangci config
This commit is contained in:
14
vendor/github.com/slack-go/slack/usergroups.go
generated
vendored
14
vendor/github.com/slack-go/slack/usergroups.go
generated
vendored
@@ -62,6 +62,10 @@ func (api *Client) CreateUserGroupContext(ctx context.Context, userGroup UserGro
|
||||
"name": {userGroup.Name},
|
||||
}
|
||||
|
||||
if userGroup.TeamID != "" {
|
||||
values["team_id"] = []string{userGroup.TeamID}
|
||||
}
|
||||
|
||||
if userGroup.Handle != "" {
|
||||
values["handle"] = []string{userGroup.Handle}
|
||||
}
|
||||
@@ -122,6 +126,12 @@ func (api *Client) EnableUserGroupContext(ctx context.Context, userGroup string)
|
||||
// GetUserGroupsOption options for the GetUserGroups method call.
|
||||
type GetUserGroupsOption func(*GetUserGroupsParams)
|
||||
|
||||
func GetUserGroupsOptionWithTeamID(teamID string) GetUserGroupsOption {
|
||||
return func(params *GetUserGroupsParams) {
|
||||
params.TeamID = teamID
|
||||
}
|
||||
}
|
||||
|
||||
// GetUserGroupsOptionIncludeCount include the number of users in each User Group (default: false)
|
||||
func GetUserGroupsOptionIncludeCount(b bool) GetUserGroupsOption {
|
||||
return func(params *GetUserGroupsParams) {
|
||||
@@ -145,6 +155,7 @@ func GetUserGroupsOptionIncludeUsers(b bool) GetUserGroupsOption {
|
||||
|
||||
// GetUserGroupsParams contains arguments for GetUserGroups method call
|
||||
type GetUserGroupsParams struct {
|
||||
TeamID string
|
||||
IncludeCount bool
|
||||
IncludeDisabled bool
|
||||
IncludeUsers bool
|
||||
@@ -166,6 +177,9 @@ func (api *Client) GetUserGroupsContext(ctx context.Context, options ...GetUserG
|
||||
values := url.Values{
|
||||
"token": {api.token},
|
||||
}
|
||||
if params.TeamID != "" {
|
||||
values.Add("team_id", params.TeamID)
|
||||
}
|
||||
if params.IncludeCount {
|
||||
values.Add("include_count", "true")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user