diff --git a/client.go b/client.go new file mode 100644 index 0000000..c5784ac --- /dev/null +++ b/client.go @@ -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 +} diff --git a/client_test.go b/client_test.go new file mode 100644 index 0000000..dce4e1c --- /dev/null +++ b/client_test.go @@ -0,0 +1,9 @@ +package jiraclient + +import ( + "testing" +) + +func TestJiraClientInstantiation(t *testing.T) { + _ = NewJiraClient("test", "test", "test") +}