Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorDetail ¶
Represents the details of an error. Should be included in the json if status is not success.
type ServiceNowClient ¶
Attributes of the client used to interact with ServiceNow API.
func NewClient ¶
func NewClient(baseUrl string, username string, password string) *ServiceNowClient
Factory method to return a new ServiceNowClient.
func (*ServiceNowClient) CreateUiPage ¶
func (client *ServiceNowClient) CreateUiPage(uiPage *UiPage) (*UiPage, error)
Creates a new UI Page in ServiceNow and returns the newly created page. The new page should include the GUID (sys_id) created in ServiceNow.
func (*ServiceNowClient) DeleteUiPage ¶
func (client *ServiceNowClient) DeleteUiPage(id string) error
Deletes a UI Page in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) GetUiPage ¶
func (client *ServiceNowClient) GetUiPage(id string) (*UiPage, error)
Retrieve a specific UI Page in ServiceNow with it's sys_id.
func (*ServiceNowClient) UpdateUiPage ¶
func (client *ServiceNowClient) UpdateUiPage(uiPage *UiPage) error
Updates a UI Page in ServiceNow.
type UiPage ¶
type UiPage struct {
Id string `json:"sys_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Direct bool `json:"direct,string"`
Html string `json:"html"`
ProcessingScript string `json:"processing_script"`
ClientScript string `json:"client_script"`
Category string `json:"category"`
Status string `json:"__status,omitempty"`
Error *ErrorDetail `json:"__error,omitempty"`
}
Represents the json response for a UI page in ServiceNow.
type UiPageResults ¶
type UiPageResults struct {
Results []UiPage `json:"records"`
}
Represents the object returned by ServiceNow API when saving or retrieving records.