Begin caching, implement commands
This commit is contained in:
18
pkg/gitlab/gitlab.go
Normal file
18
pkg/gitlab/gitlab.go
Normal file
@ -0,0 +1,18 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user