mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-24 15:36:26 -06:00
05d00a93ce
* Importing the OpsGenie SDK * Adding the goreq dependency * Initial commit of the OpsGenie / User provider * Refactoring to return a single client * Adding an import test / fixing a copy/paste error * Adding support for OpsGenie docs * Scaffolding the user documentation for OpsGenie * Adding a TODO * Adding the User data source * Documentation for OpsGenie * Adding OpsGenie to the internal plugin list * Adding support for Teams * Documentation for OpsGenie Team's * Validation for Teams * Removing Description for now * Optional fields for a User: Locale/Timezone * Removing an implemented TODO * Running makefmt * Downloading about half the internet Someone witty might simply sign this commit with "npm install" * Adding validation to the user object * Fixing the docs * Adding a test creating multple users * Prompting for the API Key if it's not specified * Added a test for multiple users / requested changes * Fixing the linting
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
package user
|
|
|
|
// Create user response structure
|
|
type CreateUserResponse struct {
|
|
Id string `json:"id"`
|
|
Status string `json:"status"`
|
|
Code int `json:"code"`
|
|
}
|
|
|
|
// Update user response structure
|
|
type UpdateUserResponse struct {
|
|
Status string `json:"status"`
|
|
Code int `json:"code"`
|
|
}
|
|
|
|
// Delete user response structure
|
|
type DeleteUserResponse struct {
|
|
Status string `json:"status"`
|
|
Code int `json:"code"`
|
|
}
|
|
|
|
// Participant
|
|
type Contact struct {
|
|
To string `json:"to,omitempty"`
|
|
Method string `json:"method,omitempty"`
|
|
}
|
|
|
|
// Get user structure
|
|
type GetUserResponse struct {
|
|
Id string `json:"id,omitempty"`
|
|
Username string `json:"username,omitempty"`
|
|
Fullname string `json:"fullname,omitempty"`
|
|
Timezone string `json:"timezone,omitempty"`
|
|
Locale string `json:"locale,omitempty"`
|
|
State string `json:"state,omitempty"`
|
|
Escalations []string `json:"escalations,omitempty"`
|
|
Schedules []string `json:"schedules,omitempty"`
|
|
Role string `json:"role,omitempty"`
|
|
Groups []string `json:"groups,omitempty"`
|
|
Contacts []Contact `json:"contacts,omitempty"`
|
|
}
|
|
|
|
// List user response structure
|
|
type ListUsersResponse struct {
|
|
Users []GetUserResponse `json:"users,omitempty"`
|
|
}
|