func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error) {
	client, err := newClient(options...)
	if err != nil {
		return nil, err
	}
	client.authType = basicAuth
	client.username = username
	client.password = password
	return client, nil
}
NewBasicAuthClient returns a new GitLab API client. To use API methods which
require authentication, provide a valid username and password.
package gitlab
import (
	"context"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"math/rand"
	"net/http"
	"net/url"
	"sort"
	"strconv"
	"strings"
	"sync"
	"time"
	"github.com/google/go-querystring/query"
	"github.com/hashicorp/go-cleanhttp"
	retryablehttp "github.com/hashicorp/go-retryablehttp"
	"golang.org/x/oauth2"
	"golang.org/x/time/rate"
)
const (
	defaultBaseURL = "https://gitlab.com/"
	apiVersionPath = "api/v4/"
	userAgent      = "go-gitlab"
	headerRateLimit = "RateLimit-Limit"
	headerRateReset = "RateLimit-Reset"
)
type authType int
const (
	basicAuth authType = iota
	oAuthToken
	privateToken
)
type Client struct {
	client *retryablehttp.Client
	baseURL *url.URL
	disableRetries bool
	configureLimiterOnce sync.Once
	limiter RateLimiter
	authType authType
	username, password string
	token string
	tokenLock sync.RWMutex
	UserAgent string
	AccessRequests        *AccessRequestsService
	Applications          *ApplicationsService
	AuditEvents           *AuditEventsService
	Avatar                *AvatarRequestsService
	AwardEmoji            *AwardEmojiService
	Boards                *IssueBoardsService
	Branches              *BranchesService
	BroadcastMessage      *BroadcastMessagesService
	CIYMLTemplate         *CIYMLTemplatesService
	Commits               *CommitsService
	ContainerRegistry     *ContainerRegistryService
	CustomAttribute       *CustomAttributesService
	DeployKeys            *DeployKeysService
	DeployTokens          *DeployTokensService
	Deployments           *DeploymentsService
	Discussions           *DiscussionsService
	Environments          *EnvironmentsService
	EpicIssues            *EpicIssuesService
	Epics                 *EpicsService
	Events                *EventsService
	Features              *FeaturesService
	FreezePeriods         *FreezePeriodsService
	GitIgnoreTemplates    *GitIgnoreTemplatesService
	GroupBadges           *GroupBadgesService
	GroupCluster          *GroupClustersService
	GroupImportExport     *GroupImportExportService
	GroupIssueBoards      *GroupIssueBoardsService
	GroupLabels           *GroupLabelsService
	GroupMembers          *GroupMembersService
	GroupMilestones       *GroupMilestonesService
	GroupVariables        *GroupVariablesService
	GroupWikis            *GroupWikisService
	Groups                *GroupsService
	InstanceCluster       *InstanceClustersService
	InstanceVariables     *InstanceVariablesService
	Invites               *InvitesService
	IssueLinks            *IssueLinksService
	Issues                *IssuesService
	IssuesStatistics      *IssuesStatisticsService
	Jobs                  *JobsService
	Keys                  *KeysService
	Labels                *LabelsService
	License               *LicenseService
	LicenseTemplates      *LicenseTemplatesService
	ManagedLicenses       *ManagedLicensesService
	MergeRequestApprovals *MergeRequestApprovalsService
	MergeRequests         *MergeRequestsService
	Milestones            *MilestonesService
	Namespaces            *NamespacesService
	Notes                 *NotesService
	NotificationSettings  *NotificationSettingsService
	Packages              *PackagesService
	PagesDomains          *PagesDomainsService
	PipelineSchedules     *PipelineSchedulesService
	PipelineTriggers      *PipelineTriggersService
	Pipelines             *PipelinesService
	ProjectBadges         *ProjectBadgesService
	ProjectAccessTokens   *ProjectAccessTokensService
	ProjectCluster        *ProjectClustersService
	ProjectImportExport   *ProjectImportExportService
	ProjectMembers        *ProjectMembersService
	ProjectMirrors        *ProjectMirrorService
	ProjectSnippets       *ProjectSnippetsService
	ProjectVariables      *ProjectVariablesService
	Projects              *ProjectsService
	ProtectedBranches     *ProtectedBranchesService
	ProtectedEnvironments *ProtectedEnvironmentsService
	ProtectedTags         *ProtectedTagsService
	ReleaseLinks          *ReleaseLinksService
	Releases              *ReleasesService
	Repositories          *RepositoriesService
	RepositoryFiles       *RepositoryFilesService
	ResourceLabelEvents   *ResourceLabelEventsService
	ResourceStateEvents   *ResourceStateEventsService
	Runners               *RunnersService
	Search                *SearchService
	Services              *ServicesService
	Settings              *SettingsService
	Sidekiq               *SidekiqService
	Snippets              *SnippetsService
	SystemHooks           *SystemHooksService
	Tags                  *TagsService
	Todos                 *TodosService
	Users                 *UsersService
	Validate              *ValidateService
	Version               *VersionService
	Wikis                 *WikisService
}
type ListOptions struct {
	Page int `url:"page,omitempty" json:"page,omitempty"`
	PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"`
}
type RateLimiter interface {
	Wait(context.Context) error
}
func NewClient(token string, options ...ClientOptionFunc) (*Client, error) {
	client, err := newClient(options...)
	if err != nil {
		return nil, err
	}
	client.authType = privateToken
	client.token = token
	return client, nil
}