-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --runAsUserId and QueryOwnershipType to alerts (#146)
- Loading branch information
1 parent
2bcc3af
commit 1d7631a
Showing
4 changed files
with
185 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package humiographql | ||
|
||
import graphql "github.com/cli/shurcooL-graphql" | ||
|
||
type Alert struct { | ||
ID graphql.String `graphql:"id"` | ||
Name graphql.String `graphql:"name"` | ||
QueryString graphql.String `graphql:"queryString"` | ||
QueryStart graphql.String `graphql:"queryStart"` | ||
ThrottleField graphql.String `graphql:"throttleField"` | ||
TimeOfLastTrigger Long `graphql:"timeOfLastTrigger"` | ||
IsStarred graphql.Boolean `graphql:"isStarred"` | ||
Description graphql.String `graphql:"description"` | ||
ThrottleTimeMillis Long `graphql:"throttleTimeMillis"` | ||
Enabled graphql.Boolean `graphql:"enabled"` | ||
Actions []graphql.String `graphql:"actions"` | ||
Labels []graphql.String `graphql:"labels"` | ||
LastError graphql.String `graphql:"lastError"` | ||
QueryOwnership struct { | ||
ID graphql.String `graphql:"id"` | ||
QueryOwnershipTypeName QueryOwnershipTypeName `graphql:"__typename"` | ||
} `graphql:"queryOwnership"` | ||
RunAsUser struct { | ||
ID graphql.String `graphql:"id"` | ||
} `graphql:"runAsUser"` | ||
} | ||
|
||
type QueryOwnership struct { | ||
} | ||
|
||
type CreateAlert struct { | ||
ViewName graphql.String `json:"viewName"` | ||
Name graphql.String `json:"name"` | ||
Description graphql.String `json:"description,omitempty"` | ||
QueryString graphql.String `json:"queryString"` | ||
QueryStart graphql.String `json:"queryStart"` | ||
ThrottleTimeMillis Long `json:"throttleTimeMillis"` | ||
ThrottleField graphql.String `json:"throttleField,omitempty"` | ||
RunAsUserID graphql.String `json:"runAsUserId,omitempty"` | ||
Enabled graphql.Boolean `json:"enabled"` | ||
Actions []graphql.String `json:"actions"` | ||
Labels []graphql.String `json:"labels"` | ||
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType,omitempty"` | ||
} | ||
|
||
type UpdateAlert struct { | ||
ViewName graphql.String `json:"viewName"` | ||
ID graphql.String `json:"id"` | ||
Name graphql.String `json:"name"` | ||
Description graphql.String `json:"description,omitempty"` | ||
QueryString graphql.String `json:"queryString"` | ||
QueryStart graphql.String `json:"queryStart"` | ||
ThrottleTimeMillis Long `json:"throttleTimeMillis"` | ||
ThrottleField graphql.String `json:"throttleField,omitempty"` | ||
RunAsUserID graphql.String `json:"runAsUserId,omitempty"` | ||
Enabled graphql.Boolean `json:"enabled"` | ||
Actions []graphql.String `json:"actions"` | ||
Labels []graphql.String `json:"labels"` | ||
QueryOwnershipType QueryOwnershipType `json:"queryOwnershipType,omitempty"` | ||
} | ||
|
||
type Long int64 | ||
|
||
type QueryOwnershipTypeName string | ||
|
||
const ( | ||
QueryOwnershipTypeNameOrganization QueryOwnershipTypeName = "OrganizationOwnership" | ||
QueryOwnershipTypeNameUser QueryOwnershipTypeName = "UserOwnership" | ||
) | ||
|
||
type QueryOwnershipType string | ||
|
||
const ( | ||
QueryOwnershipTypeUser QueryOwnershipType = "User" | ||
QueryOwnershipTypeOrganization QueryOwnershipType = "Organization" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters