Commit 26b62ef6 authored by Sander van Harmelen's avatar Sander van Harmelen

Reorder the list of services

parent e82b6532
......@@ -20,53 +20,53 @@ incompatible changes that were needed to fully support the V4 Gitlab API.
This API client package covers most of the existing Gitlab API calls and is updated regularly
to add new and/or missing endpoints. Currently the following services are supported:
- [ ] Discussions (threaded comments)
- [ ] Epic Issues
- [ ] Epics
- [ ] Geo Nodes
- [ ] Project import/export
- [x] Award Emojis
- [x] Branches
- [x] Broadcast Messages
- [x] Project-level Variables
- [x] Group-level Variables
- [x] Commits
- [x] Custom Attributes
- [x] Deployments
- [x] Deploy Keys
- [x] Deployments
- [x] Environments
- [ ] Epics
- [ ] Epic Issues
- [x] Events
- [x] Feature flags
- [ ] Geo Nodes
- [x] Gitignores templates
- [x] GitLab CI Config templates
- [x] Groups
- [x] Gitignores templates
- [x] Group Access Requests
- [x] Group Issue Boards
- [x] Group Members
- [x] Issues
- [x] Group Milestones
- [x] Group-level Variables
- [x] Groups
- [x] Issue Boards
- [x] Group Issue Boards
- [x] Issues
- [x] Jobs
- [x] Keys
- [x] Labels
- [x] License
- [x] Merge Requests
- [x] Merge Request Approvals
- [x] Project Milestones
- [x] Group Milestones
- [x] Merge Requests
- [x] Namespaces
- [x] Notes (comments)
- [ ] Discussions (threaded comments)
- [x] Notification settings
- [x] Open source license templates
- [x] Pages Domains
- [x] Pipelines
- [x] Pipeline Triggers
- [x] Pipeline Schedules
- [x] Projects (including setting Webhooks)
- [x] Pipeline Triggers
- [x] Pipelines
- [x] Project Access Requests
- [x] Project badges
- [ ] Project import/export
- [x] Project Clusters
- [x] Project Members
- [x] Project Milestones
- [x] Project Snippets
- [x] Project Clusters
- [x] Project badges
- [x] Project-level Variables
- [x] Projects (including setting Webhooks)
- [x] Protected Branches
- [x] Protected Tags
- [x] Repositories
......
......@@ -288,9 +288,10 @@ type Client struct {
// Services used for talking to different parts of the GitLab API.
AccessRequests *AccessRequestsService
AwardEmoji *AwardEmojiService
Boards *IssueBoardsService
Branches *BranchesService
BuildVariables *BuildVariablesService
BroadcastMessage *BroadcastMessagesService
BuildVariables *BuildVariablesService
CIYMLTemplate *CIYMLTemplatesService
Commits *CommitsService
CustomAttribute *CustomAttributesService
......@@ -301,35 +302,34 @@ type Client struct {
Events *EventsService
Features *FeaturesService
GitIgnoreTemplates *GitIgnoreTemplatesService
Groups *GroupsService
GroupIssueBoards *GroupIssueBoardsService
GroupMembers *GroupMembersService
GroupMilestones *GroupMilestonesService
GroupVariables *GroupVariablesService
Issues *IssuesService
Groups *GroupsService
IssueLinks *IssueLinksService
Issues *IssuesService
Jobs *JobsService
Keys *KeysService
Boards *IssueBoardsService
Labels *LabelsService
License *LicenseService
LicenseTemplates *LicenseTemplatesService
MergeRequests *MergeRequestsService
MergeRequestApprovals *MergeRequestApprovalsService
MergeRequests *MergeRequestsService
Milestones *MilestonesService
Namespaces *NamespacesService
Notes *NotesService
NotificationSettings *NotificationSettingsService
PagesDomains *PagesDomainsService
Pipelines *PipelinesService
PipelineSchedules *PipelineSchedulesService
PipelineTriggers *PipelineTriggersService
Projects *ProjectsService
ProjectMembers *ProjectMembersService
Pipelines *PipelinesService
ProjectBadges *ProjectBadgesService
ProjectCluster *ProjectClustersService
ProjectMembers *ProjectMembersService
ProjectSnippets *ProjectSnippetsService
ProjectVariables *ProjectVariablesService
ProjectCluster *ProjectClustersService
Projects *ProjectsService
ProtectedBranches *ProtectedBranchesService
ProtectedTags *ProtectedTagsService
Repositories *RepositoriesService
......@@ -430,9 +430,10 @@ func newClient(httpClient *http.Client) *Client {
// Create all the public services.
c.AccessRequests = &AccessRequestsService{client: c}
c.AwardEmoji = &AwardEmojiService{client: c}
c.Boards = &IssueBoardsService{client: c}
c.Branches = &BranchesService{client: c}
c.BuildVariables = &BuildVariablesService{client: c}
c.BroadcastMessage = &BroadcastMessagesService{client: c}
c.BuildVariables = &BuildVariablesService{client: c}
c.CIYMLTemplate = &CIYMLTemplatesService{client: c}
c.Commits = &CommitsService{client: c}
c.CustomAttribute = &CustomAttributesService{client: c}
......@@ -443,42 +444,41 @@ func newClient(httpClient *http.Client) *Client {
c.Events = &EventsService{client: c}
c.Features = &FeaturesService{client: c}
c.GitIgnoreTemplates = &GitIgnoreTemplatesService{client: c}
c.Groups = &GroupsService{client: c}
c.GroupIssueBoards = &GroupIssueBoardsService{client: c}
c.GroupMembers = &GroupMembersService{client: c}
c.GroupMilestones = &GroupMilestonesService{client: c}
c.GroupVariables = &GroupVariablesService{client: c}
c.Issues = &IssuesService{client: c, timeStats: timeStats}
c.Groups = &GroupsService{client: c}
c.IssueLinks = &IssueLinksService{client: c}
c.Issues = &IssuesService{client: c, timeStats: timeStats}
c.Jobs = &JobsService{client: c}
c.Keys = &KeysService{client: c}
c.Boards = &IssueBoardsService{client: c}
c.Labels = &LabelsService{client: c}
c.License = &LicenseService{client: c}
c.LicenseTemplates = &LicenseTemplatesService{client: c}
c.MergeRequests = &MergeRequestsService{client: c, timeStats: timeStats}
c.MergeRequestApprovals = &MergeRequestApprovalsService{client: c}
c.MergeRequests = &MergeRequestsService{client: c, timeStats: timeStats}
c.Milestones = &MilestonesService{client: c}
c.Namespaces = &NamespacesService{client: c}
c.Notes = &NotesService{client: c}
c.NotificationSettings = &NotificationSettingsService{client: c}
c.PagesDomains = &PagesDomainsService{client: c}
c.Pipelines = &PipelinesService{client: c}
c.PipelineSchedules = &PipelineSchedulesService{client: c}
c.PipelineTriggers = &PipelineTriggersService{client: c}
c.Projects = &ProjectsService{client: c}
c.ProjectMembers = &ProjectMembersService{client: c}
c.Pipelines = &PipelinesService{client: c}
c.ProjectBadges = &ProjectBadgesService{client: c}
c.ProjectCluster = &ProjectClustersService{client: c}
c.ProjectMembers = &ProjectMembersService{client: c}
c.ProjectSnippets = &ProjectSnippetsService{client: c}
c.ProjectVariables = &ProjectVariablesService{client: c}
c.ProjectCluster = &ProjectClustersService{client: c}
c.Projects = &ProjectsService{client: c}
c.ProtectedBranches = &ProtectedBranchesService{client: c}
c.ProtectedTags = &ProtectedTagsService{client: c}
c.Repositories = &RepositoriesService{client: c}
c.RepositoryFiles = &RepositoryFilesService{client: c}
c.Runners = &RunnersService{client: c}
c.Services = &ServicesService{client: c}
c.Search = &SearchService{client: c}
c.Services = &ServicesService{client: c}
c.Settings = &SettingsService{client: c}
c.Sidekiq = &SidekiqService{client: c}
c.Snippets = &SnippetsService{client: c}
......
......@@ -33,8 +33,7 @@ type ProjectClustersService struct {
// ProjectCluster represents a GitLab Project Cluster.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/project_clusters.html
// GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html
type ProjectCluster struct {
ID int `json:"id"`
Name string `json:"name"`
......@@ -61,15 +60,6 @@ type PlatformKubernetes struct {
AuthorizationType string `json:"authorization_type"`
}
// PlatformKubernetesOptions represents the available PlatformKubernetes options.
type PlatformKubernetesOptions struct {
APIURL *string `url:"api_url,omitempty" json:"api_url,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
CaCert *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
Namespace *string `url:"namespace,omitempty" json:"namespace,omitempty"`
AuthorizationType *string `url:"authorization_type,omitempty" json:"authorization_type,omitempty"`
}
// ListClusters gets a list of all clusters in a project.
//
// GitLab API docs:
......@@ -86,13 +76,13 @@ func (s *ProjectClustersService) ListClusters(pid interface{}, options ...Option
return nil, nil, err
}
var pc []*ProjectCluster
resp, err := s.client.Do(req, &pc)
var pcs []*ProjectCluster
resp, err := s.client.Do(req, &pcs)
if err != nil {
return nil, resp, err
}
return pc, resp, err
return pcs, resp, err
}
// GetCluster gets a cluster.
......@@ -111,7 +101,7 @@ func (s *ProjectClustersService) GetCluster(pid interface{}, cluster int, option
return nil, nil, err
}
var pc *ProjectCluster
pc := new(ProjectCluster)
resp, err := s.client.Do(req, &pc)
if err != nil {
return nil, resp, err
......@@ -131,6 +121,15 @@ type AddClusterOptions struct {
PlatformKubernetes *PlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
}
// PlatformKubernetesOptions represents the available PlatformKubernetes options.
type PlatformKubernetesOptions struct {
APIURL *string `url:"api_url,omitempty" json:"api_url,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
CaCert *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
Namespace *string `url:"namespace,omitempty" json:"namespace,omitempty"`
AuthorizationType *string `url:"authorization_type,omitempty" json:"authorization_type,omitempty"`
}
// AddCluster adds an existing cluster to the project.
//
// GitLab API docs:
......
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