Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit 2526565

Browse files
committed
Deprecate module and its exported client type and constructor functions
This change set deprecates this module and its exported `Client` type and its constructor functions: `NewClient`, `NewBasicAuthClient`, `NewJobClient` and `NewOAuthClient`. Use the new module at https://gitlab.com/gitlab-org/client-go
1 parent 098437b commit 2526565

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

gitlab.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ const (
7070
var ErrNotFound = errors.New("404 Not Found")
7171

7272
// A Client manages communication with the GitLab API.
73+
//
74+
// Deprecated: use gitlab.com/gitlab-org/api/client-go instead.
75+
// See https://gitlab.com/gitlab-org/api/client-go
76+
//
77+
// This package is completely frozen, nothing will be added, removed or changed.
7378
type Client struct {
7479
// HTTP client used to communicate with the API.
7580
client *retryablehttp.Client
@@ -258,6 +263,11 @@ type RateLimiter interface {
258263

259264
// NewClient returns a new GitLab API client. To use API methods which require
260265
// authentication, provide a valid private or personal token.
266+
//
267+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
268+
// See https://gitlab.com/gitlab-org/api/client-go
269+
//
270+
// This package is completely frozen, nothing will be added, removed or changed.
261271
func NewClient(token string, options ...ClientOptionFunc) (*Client, error) {
262272
client, err := newClient(options...)
263273
if err != nil {
@@ -270,6 +280,11 @@ func NewClient(token string, options ...ClientOptionFunc) (*Client, error) {
270280

271281
// NewBasicAuthClient returns a new GitLab API client. To use API methods which
272282
// require authentication, provide a valid username and password.
283+
//
284+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
285+
// See https://gitlab.com/gitlab-org/api/client-go
286+
//
287+
// This package is completely frozen, nothing will be added, removed or changed.
273288
func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error) {
274289
client, err := newClient(options...)
275290
if err != nil {
@@ -285,6 +300,11 @@ func NewBasicAuthClient(username, password string, options ...ClientOptionFunc)
285300

286301
// NewJobClient returns a new GitLab API client. To use API methods which require
287302
// authentication, provide a valid job token.
303+
//
304+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
305+
// See https://gitlab.com/gitlab-org/api/client-go
306+
//
307+
// This package is completely frozen, nothing will be added, removed or changed.
288308
func NewJobClient(token string, options ...ClientOptionFunc) (*Client, error) {
289309
client, err := newClient(options...)
290310
if err != nil {
@@ -297,6 +317,11 @@ func NewJobClient(token string, options ...ClientOptionFunc) (*Client, error) {
297317

298318
// NewOAuthClient returns a new GitLab API client. To use API methods which
299319
// require authentication, provide a valid oauth token.
320+
//
321+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go.
322+
// See https://gitlab.com/gitlab-org/api/client-go
323+
//
324+
// This package is completely frozen, nothing will be added, removed or changed.
300325
func NewOAuthClient(token string, options ...ClientOptionFunc) (*Client, error) {
301326
client, err := newClient(options...)
302327
if err != nil {

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. See https://gitlab.com/gitlab-org/api/client-go
12
module github.com/xanzy/go-gitlab
23

34
go 1.19

0 commit comments

Comments
 (0)