19 lines
339 B
Go
19 lines
339 B
Go
package gitlab
|
|
|
|
import "github.com/xanzy/go-gitlab"
|
|
|
|
type Client struct {
|
|
gitlab *gitlab.Client
|
|
}
|
|
|
|
func NewGitlabClient(host, token string) (*Client, error) {
|
|
client, err := gitlab.NewClient(token, gitlab.WithBaseURL(host))
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
gitlabClient := &Client{
|
|
gitlab: client,
|
|
}
|
|
return gitlabClient, nil
|
|
}
|