Add the `JiraClient` type
parent
7be17e6c88
commit
fb0e4a8557
|
@ -0,0 +1,24 @@
|
|||
package jiraclient
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func NewJiraClient(username, token, domain string) *JiraClient {
|
||||
client := &http.Client{}
|
||||
|
||||
return &JiraClient{
|
||||
Username: username,
|
||||
Token: token,
|
||||
Domain: domain,
|
||||
Client: client,
|
||||
}
|
||||
}
|
||||
|
||||
// JiraClient manages communication with Jira Cloud's V2 REST API.
|
||||
type JiraClient struct {
|
||||
Username string
|
||||
Token string
|
||||
Domain string
|
||||
Client *http.Client
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package jiraclient
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestJiraClientInstantiation(t *testing.T) {
|
||||
_ = NewJiraClient("test", "test", "test")
|
||||
}
|
Loading…
Reference in New Issue