mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
* 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
48 lines
1.6 KiB
Go
48 lines
1.6 KiB
Go
/*
|
|
Copyright 2016. All rights reserved.
|
|
Use of this source code is governed by a Apache Software
|
|
license that can be found in the LICENSE file.
|
|
*/
|
|
|
|
//Package user provides requests and response structures to achieve User API actions.
|
|
package user
|
|
|
|
// CreateUserRequest provides necessary parameter structure for creating User
|
|
type CreateUserRequest struct {
|
|
APIKey string `json:"apiKey,omitempty"`
|
|
Username string `json:"username,omitempty"`
|
|
Fullname string `json:"fullname,omitempty"`
|
|
Role string `json:"role,omitempty"`
|
|
Locale string `json:"locale,omitempty"`
|
|
Timezone string `json:"timezone,omitempty"`
|
|
}
|
|
|
|
// UpdateUserRequest provides necessary parameter structure for updating an User
|
|
type UpdateUserRequest struct {
|
|
Id string `json:"id,omitempty"`
|
|
APIKey string `json:"apiKey,omitempty"`
|
|
Fullname string `json:"fullname,omitempty"`
|
|
Role string `json:"role,omitempty"`
|
|
Locale string `json:"locale,omitempty"`
|
|
Timezone string `json:"timezone,omitempty"`
|
|
}
|
|
|
|
// DeleteUserRequest provides necessary parameter structure for deleting an User
|
|
type DeleteUserRequest struct {
|
|
APIKey string `url:"apiKey,omitempty"`
|
|
Id string `url:"id,omitempty"`
|
|
Username string `url:"username,omitempty"`
|
|
}
|
|
|
|
// GetUserRequest provides necessary parameter structure for requesting User information
|
|
type GetUserRequest struct {
|
|
APIKey string `url:"apiKey,omitempty"`
|
|
Id string `url:"id,omitempty"`
|
|
Username string `url:"username,omitempty"`
|
|
}
|
|
|
|
// ListUserRequest provides necessary parameter structure for listing Users
|
|
type ListUsersRequest struct {
|
|
APIKey string `url:"apiKey,omitempty"`
|
|
}
|