diff --git a/gitlab.go b/gitlab.go index 19ed3eadb..d5f328e22 100644 --- a/gitlab.go +++ b/gitlab.go @@ -70,6 +70,11 @@ const ( var ErrNotFound = errors.New("404 Not Found") // A Client manages communication with the GitLab API. +// +// Deprecated: use gitlab.com/gitlab-org/api/client-go instead. +// See https://gitlab.com/gitlab-org/api/client-go +// +// This package is completely frozen, nothing will be added, removed or changed. type Client struct { // HTTP client used to communicate with the API. client *retryablehttp.Client @@ -258,6 +263,11 @@ type RateLimiter interface { // NewClient returns a new GitLab API client. To use API methods which require // authentication, provide a valid private or personal token. +// +// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. +// See https://gitlab.com/gitlab-org/api/client-go +// +// This package is completely frozen, nothing will be added, removed or changed. func NewClient(token string, options ...ClientOptionFunc) (*Client, error) { client, err := newClient(options...) if err != nil { @@ -270,6 +280,11 @@ func NewClient(token string, options ...ClientOptionFunc) (*Client, error) { // NewBasicAuthClient returns a new GitLab API client. To use API methods which // require authentication, provide a valid username and password. +// +// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. +// See https://gitlab.com/gitlab-org/api/client-go +// +// This package is completely frozen, nothing will be added, removed or changed. func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error) { client, err := newClient(options...) if err != nil { @@ -285,6 +300,11 @@ func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) // NewJobClient returns a new GitLab API client. To use API methods which require // authentication, provide a valid job token. +// +// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. +// See https://gitlab.com/gitlab-org/api/client-go +// +// This package is completely frozen, nothing will be added, removed or changed. func NewJobClient(token string, options ...ClientOptionFunc) (*Client, error) { client, err := newClient(options...) if err != nil { @@ -297,6 +317,11 @@ func NewJobClient(token string, options ...ClientOptionFunc) (*Client, error) { // NewOAuthClient returns a new GitLab API client. To use API methods which // require authentication, provide a valid oauth token. +// +// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. +// See https://gitlab.com/gitlab-org/api/client-go +// +// This package is completely frozen, nothing will be added, removed or changed. func NewOAuthClient(token string, options ...ClientOptionFunc) (*Client, error) { client, err := newClient(options...) if err != nil { diff --git a/go.mod b/go.mod index 03cff50b5..8eefc24fa 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,4 @@ +// Deprecated: This module has been migrated to gitlab.com/gitlab-org/api/client-go. See https://gitlab.com/gitlab-org/api/client-go module github.com/xanzy/go-gitlab go 1.19