Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AlertSilencePeriod
- type BasicAuth
- type Configuration
- type Device
- type DeviceApiService
- func (a *DeviceApiService) AddDevice(ctx context.Context, device Device) (Result, *http.Response, error)
- func (a *DeviceApiService) DeleteDevice(ctx context.Context, deviceId string) (Result, *http.Response, error)
- func (a *DeviceApiService) DisableDeviceAlert(ctx context.Context, deviceId string, ...) (Result, *http.Response, error)
- func (a *DeviceApiService) EditDevice(ctx context.Context, deviceId string, device Device) (Result, *http.Response, error)
- func (a *DeviceApiService) GetDevice(ctx context.Context, deviceId string) (interface{}, *http.Response, error)
- func (a *DeviceApiService) GetDevicesPlataform(ctx context.Context, platform string) ([]int32, *http.Response, error)
- func (a *DeviceApiService) GetTasks(ctx context.Context, deviceId string) ([]int32, *http.Response, error)
- type DeviceNotifications
- type DeviceNotificationsNotificationGroups
- type DisableDeviceAlertOpts
- type GenericSwaggerError
- type Location
- type LocationApiService
- type LoginApiService
- type Platform
- type PlatformPackages
- type PlatformsApiService
- type Result
- type Task
- type TaskApiService
- func (a *TaskApiService) AddTask(ctx context.Context, device Task) (Result, *http.Response, error)
- func (a *TaskApiService) DeleteTask(ctx context.Context, taskId string) (Result, *http.Response, error)
- func (a *TaskApiService) EditTask(ctx context.Context, taskId string, task Task) (Result, *http.Response, error)
- func (a *TaskApiService) GetTask(ctx context.Context, taskId string) (Task, *http.Response, error)
- func (a *TaskApiService) GetTasks(ctx context.Context, deviceId string) ([]int32, *http.Response, error)
- type TaskGetParams
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { DeviceApi *DeviceApiService PlatformsApi *PlatformsApiService TaskApi *TaskApiService LoginApi *LoginApiService LocationApi *LocationApiService // contains filtered or unexported fields }
APIClient manages communication with the dotcom-monitor API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AlertSilencePeriod ¶
type AlertSilencePeriod struct {
AlertSilenceMin int32 `json:"Alert_Silence_min,omitempty"`
}
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"UserName,omitempty"` Password string `json:"Password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type Device ¶
type Device struct { AvoidSimultaneousChecks bool `json:"Avoid_Simultaneous_Checks,omitempty"` AlertSilenceMin int32 `json:"Alert_Silence_Min,omitempty"` FalsePositiveCheck bool `json:"False_Positive_Check,omitempty"` Locations []int32 `json:"Locations,omitempty"` SendUptimeAlert bool `json:"Send_Uptime_Alert,omitempty"` StatusDescription string `json:"Status_Description,omitempty"` Postpone bool `json:"Postpone"` OwnerDeviceId int32 `json:"Owner_Device_Id,omitempty"` Frequency int32 `json:"Frequency,omitempty"` FilterId int32 `json:"Filter_Id,omitempty"` SchedulerId int32 `json:"Scheduler_Id,omitempty"` NumberOfTasks int32 `json:"Number_Of_Tasks,omitempty"` Id int32 `json:"Id,omitempty"` PlatformId int32 `json:"Platform_Id,omitempty"` PackageId int32 `json:"Package_Id,omitempty"` Name string `json:"Name,omitempty"` Notifications *DeviceNotifications `json:"Notifications,omitempty"` }
type DeviceApiService ¶
type DeviceApiService service
func (*DeviceApiService) AddDevice ¶
func (a *DeviceApiService) AddDevice(ctx context.Context, device Device) (Result, *http.Response, error)
DeviceApiService Get device list by platform. Get device list by platform.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param device Device Object
@return Result
func (*DeviceApiService) DeleteDevice ¶
func (a *DeviceApiService) DeleteDevice(ctx context.Context, deviceId string) (Result, *http.Response, error)
DeviceApiService Get Device info. Get Device info.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceId device id
@return Result
func (*DeviceApiService) DisableDeviceAlert ¶
func (a *DeviceApiService) DisableDeviceAlert(ctx context.Context, deviceId string, localVarOptionals *DisableDeviceAlertOpts) (Result, *http.Response, error)
func (*DeviceApiService) EditDevice ¶
func (a *DeviceApiService) EditDevice(ctx context.Context, deviceId string, device Device) (Result, *http.Response, error)
DeviceApiService Edit device list by platform. Edit device list by platform.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceId Device id
- @param device Device Object
@return Result
func (*DeviceApiService) GetDevice ¶
func (a *DeviceApiService) GetDevice(ctx context.Context, deviceId string) (interface{}, *http.Response, error)
DeviceApiService Get Device info. Get Device info.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceId device id
@return interface{}
func (*DeviceApiService) GetDevicesPlataform ¶
func (a *DeviceApiService) GetDevicesPlataform(ctx context.Context, platform string) ([]int32, *http.Response, error)
DeviceApiService Get device list by platform. Get device list by platform.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param platform Platform name
@return []int32
func (*DeviceApiService) GetTasks ¶
func (a *DeviceApiService) GetTasks(ctx context.Context, deviceId string) ([]int32, *http.Response, error)
DeviceApiService Get Device tasks. Get Device tasks.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceId device id
@return []int32
type DeviceNotifications ¶
type DeviceNotifications struct { EMailFlag bool `json:"E_Mail_Flag"` EMailAddress string `json:"E_Mail_Address,omitempty"` EMailTimeIntervalMin int32 `json:"E_Mail_TimeInterval_Min,omitempty"` WLDeviceFlag bool `json:"WL_Device_Flag"` WLDeviceEmailAddress string `json:"WL_Device_Email_Address,omitempty"` WLDeviceTimeIntervalMin int32 `json:"WL_Device_TimeInterval_Min,omitempty"` PagerFlag bool `json:"Pager_Flag"` PagerAreaCode string `json:"Pager_Area_Code,omitempty"` PagerPhone string `json:"Pager_Phone,omitempty"` PagerNumCode string `json:"Pager_Num_Code,omitempty"` PagerTimeIntervalMin int32 `json:"Pager_TimeInterval_Min,omitempty"` PhoneFlag bool `json:"Phone_Flag"` PhoneAreaCode string `json:"Phone_Area_Code,omitempty"` PhonePhone string `json:"Phone_Phone,omitempty"` PhoneTimeIntervalMin int32 `json:"Phone_TimeInterval_Min,omitempty"` SMSFlag bool `json:"SMS_Flag"` SMSPhone string `json:"SMS_Phone,omitempty"` SMSTimeIntervalMin int32 `json:"SMS_TimeInterval_Min,omitempty"` ScriptFlag bool `json:"Script_Flag"` ScriptBatchFileName string `json:"Script_Batch_File_Name,omitempty"` ScriptTimeIntervalMin int32 `json:"Script_TimeInterval_Min,omitempty"` SNMPTimeIntervalMin int32 `json:"SNMP_TimeInterval_Min,omitempty"` NotificationGroups []DeviceNotificationsNotificationGroups `json:"Notification_Groups"` }
type DisableDeviceAlertOpts ¶
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type LocationApiService ¶
type LocationApiService service
func (*LocationApiService) GetLocations ¶
func (a *LocationApiService) GetLocations(ctx context.Context, platformName string) ([]Location, *http.Response, error)
LocationApiService Get location list by platform. Get location list by platform.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param platformName Platform name
@return []Location
type LoginApiService ¶
type LoginApiService service
func (*LoginApiService) Login ¶
func (a *LoginApiService) Login(ctx context.Context, credential BasicAuth) (Result, *http.Response, error)
LoginApiService Get device list by platform. Get device list by platform.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param device Device Object
@return Result
type Platform ¶
type Platform struct { Id int32 `json:"Id,omitempty"` Name string `json:"Name,omitempty"` Available bool `json:"Available,omitempty"` Packages []PlatformPackages `json:"Packages,omitempty"` }
type PlatformPackages ¶
type PlatformsApiService ¶
type PlatformsApiService service
func (*PlatformsApiService) GetPlataforms ¶
func (a *PlatformsApiService) GetPlataforms(ctx context.Context) ([]Platform, *http.Response, error)
PlatformsApiService Return list of available platforms Return list of available platforms.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Platform
type Task ¶
type Task struct { RequestType string `json:"RequestType,omitempty"` Url string `json:"Url,omitempty"` Keyword1 string `json:"Keyword1"` Keyword2 string `json:"Keyword2"` Keyword3 string `json:"Keyword3"` UserName string `json:"UserName"` UserPass string `json:"UserPass"` FullPageDownload bool `json:"FullPageDownload"` DownloadHtml bool `json:"Download_Html"` DownloadFrames bool `json:"Download_Frames"` DownloadStyleSheets bool `json:"Download_StyleSheets"` DownloadScripts bool `json:"Download_Scripts"` DownloadImages bool `json:"Download_Images"` DownloadObjects bool `json:"Download_Objects"` DownloadApplets bool `json:"Download_Applets"` DownloadAdditional bool `json:"Download_Additional"` GetParams []TaskGetParams `json:"GetParams"` PostParams []TaskGetParams `json:"PostParams"` HeaderParams []TaskGetParams `json:"HeaderParams"` PrepareScript string `json:"PrepareScript"` DNSResolveMode string `json:"DNSResolveMode"` DNSserverIP *string `json:"DNSserverIP"` DeviceId int32 `json:"Device_Id,omitempty"` TaskTypeId int32 `json:"Task_Type_Id,omitempty"` Name string `json:"Name,omitempty"` Timeout int32 `json:"Timeout,omitempty"` }
type TaskApiService ¶
type TaskApiService service
func (*TaskApiService) AddTask ¶
TaskApiService Create new task. Create new task.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param device Task Object
@return Result
func (*TaskApiService) DeleteTask ¶
func (a *TaskApiService) DeleteTask(ctx context.Context, taskId string) (Result, *http.Response, error)
TaskApiService Delete Task info. Delete Task info.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId task id
@return Result
func (*TaskApiService) EditTask ¶
func (a *TaskApiService) EditTask(ctx context.Context, taskId string, task Task) (Result, *http.Response, error)
TaskApiService Edit task. Edit task.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId Task id
- @param task Task Object
@return Result
func (*TaskApiService) GetTask ¶
TaskApiService Get Task info. Get Task info.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param taskId task id
@return Task
func (*TaskApiService) GetTasks ¶
func (a *TaskApiService) GetTasks(ctx context.Context, deviceId string) ([]int32, *http.Response, error)
TaskApiService Get Device tasks. Get Device tasks.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceId device id
@return []int32
type TaskGetParams ¶
Source Files ¶
- api_device.go
- api_location.go
- api_login.go
- api_platforms.go
- api_task.go
- client.go
- configuration.go
- model_alert_silence_period.go
- model_device.go
- model_device_notifications.go
- model_device_notifications_notification_groups.go
- model_location.go
- model_platform.go
- model_platform_packages.go
- model_result.go
- model_task.go
- model_task_get_params.go
- response.go