Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alert] ListAlertResult paging #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package account

import (
"context"
"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion account/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package account
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type GetRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion account/result.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package account

import "github.com/opsgenie/opsgenie-go-sdk-v2/client"
import "github.com/joeyparsons/opsgenie-go-sdk-v2/client"

type GetResult struct {
client.ResultMetadata
Expand Down
2 changes: 1 addition & 1 deletion alert/acknowledge_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/add_details_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/add_note_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/add_responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/add_tags_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/add_team_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package alert

import (
"context"
"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/assign_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/close_alert_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/count_alerts_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type CountAlertsRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/create_alert_attachment_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path"
"strings"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type CreateAlertAttachmentRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/create_alert_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type CreateAlertRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/create_saved_search_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/delete_alert_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type DeleteAlertRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/delete_attachment_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/delete_saved_search_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type DeleteSavedSearchRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/escalate_to_next_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/execute_custom_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/get_alert_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type GetAlertRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/get_attachment_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/get_request_status_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/get_saved_search_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type GetSavedSearchRequest struct {
Expand Down
8 changes: 4 additions & 4 deletions alert/list_alert_logs_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"net/http"
"strconv"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type ListAlertLogsRequest struct {
client.BaseRequest
IdentifierType AlertIdentifier
IdentifierValue string
Offset string
Offset int
Direction RequestDirection
Order Order
Limit uint32
Expand Down Expand Up @@ -47,8 +47,8 @@ func (r *ListAlertLogsRequest) RequestParams() map[string]string {
params["identifierType"] = "id"
}

if r.Offset != "" {
params["offset"] = r.Offset
if r.Offset != 0 {
params["offset"] = strconv.Itoa(r.Offset)
}

if r.Order == Asc {
Expand Down
2 changes: 1 addition & 1 deletion alert/list_alert_notes_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"strconv"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type ListAlertNotesRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/list_alert_recipient_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type ListAlertRecipientRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/list_alert_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"strconv"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type ListAlertRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/list_attachments_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/list_saved_search_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type ListSavedSearchRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/remove_details_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/remove_tags_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
6 changes: 4 additions & 2 deletions alert/result.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package alert

import (
"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"time"

"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type Alert struct {
Expand Down Expand Up @@ -37,7 +38,8 @@ type Integration struct {

type ListAlertResult struct {
client.ResultMetadata
Alerts []Alert `json:"data"`
Alerts []Alert `json:"data"`
Paging map[string]string `json:"paging,omitempty"`
}

type RequestStatusResult struct {
Expand Down
2 changes: 1 addition & 1 deletion alert/snooze_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"time"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/unacknowledge_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/update_description_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/update_message_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/update_priority_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion alert/update_saved_search_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package alert
import (
"net/http"

"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion contact/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package contact

import (
"context"
"github.com/opsgenie/opsgenie-go-sdk-v2/client"
"github.com/joeyparsons/opsgenie-go-sdk-v2/client"
)

type Client struct {
Expand Down
Loading