Documentation ¶
Index ¶
- type BaseResult
- type CssInclude
- type CssIncludeRelation
- type CssIncludeRelationResults
- type CssIncludeResults
- type ErrorDetail
- type JsInclude
- type JsIncludeRelation
- type JsIncludeRelationResults
- type JsIncludeResults
- type RequestResults
- type ServiceNowClient
- func (client *ServiceNowClient) CreateCssInclude(cssInclude *CssInclude) (*CssInclude, error)
- func (client *ServiceNowClient) CreateCssIncludeRelation(relation *CssIncludeRelation) (*CssIncludeRelation, error)
- func (client *ServiceNowClient) CreateJsInclude(jsInclude *JsInclude) (*JsInclude, error)
- func (client *ServiceNowClient) CreateJsIncludeRelation(relation *JsIncludeRelation) (*JsIncludeRelation, error)
- func (client *ServiceNowClient) CreateUiPage(uiPage *UiPage) (*UiPage, error)
- func (client *ServiceNowClient) CreateWidget(widget *Widget) (*Widget, error)
- func (client *ServiceNowClient) CreateWidgetDependency(widgetDependency *WidgetDependency) (*WidgetDependency, error)
- func (client *ServiceNowClient) CreateWidgetDependencyRelation(relation *WidgetDependencyRelation) (*WidgetDependencyRelation, error)
- func (client *ServiceNowClient) DeleteCssInclude(id string) error
- func (client *ServiceNowClient) DeleteCssIncludeRelation(id string) error
- func (client *ServiceNowClient) DeleteJsInclude(id string) error
- func (client *ServiceNowClient) DeleteJsIncludeRelation(id string) error
- func (client *ServiceNowClient) DeleteUiPage(id string) error
- func (client *ServiceNowClient) DeleteWidget(id string) error
- func (client *ServiceNowClient) DeleteWidgetDependency(id string) error
- func (client *ServiceNowClient) DeleteWidgetDependencyRelation(id string) error
- func (client *ServiceNowClient) GetCssInclude(id string) (*CssInclude, error)
- func (client *ServiceNowClient) GetCssIncludeRelation(id string) (*CssIncludeRelation, error)
- func (client *ServiceNowClient) GetJsInclude(id string) (*JsInclude, error)
- func (client *ServiceNowClient) GetJsIncludeRelation(id string) (*JsIncludeRelation, error)
- func (client *ServiceNowClient) GetUiPage(id string) (*UiPage, error)
- func (client *ServiceNowClient) GetWidget(id string) (*Widget, error)
- func (client *ServiceNowClient) GetWidgetDependency(id string) (*WidgetDependency, error)
- func (client *ServiceNowClient) GetWidgetDependencyRelation(id string) (*WidgetDependencyRelation, error)
- func (client *ServiceNowClient) UpdateCssInclude(cssInclude *CssInclude) error
- func (client *ServiceNowClient) UpdateCssIncludeRelation(relation *CssIncludeRelation) error
- func (client *ServiceNowClient) UpdateJsInclude(jsInclude *JsInclude) error
- func (client *ServiceNowClient) UpdateJsIncludeRelation(relation *JsIncludeRelation) error
- func (client *ServiceNowClient) UpdateUiPage(uiPage *UiPage) error
- func (client *ServiceNowClient) UpdateWidget(widget *Widget) error
- func (client *ServiceNowClient) UpdateWidgetDependency(widgetDependency *WidgetDependency) error
- func (client *ServiceNowClient) UpdateWidgetDependencyRelation(relation *WidgetDependencyRelation) error
- type UiPage
- type UiPageResults
- type Widget
- type WidgetDependency
- type WidgetDependencyRelation
- type WidgetDependencyRelationResults
- type WidgetDependencyResults
- type WidgetResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResult ¶ added in v0.2.0
type BaseResult struct { Id string `json:"sys_id,omitempty"` Status string `json:"__status,omitempty"` Error *ErrorDetail `json:"__error,omitempty"` }
BaseResult is representing the default properties of all results.
type CssInclude ¶ added in v0.2.0
type CssInclude struct { BaseResult Source string `json:"source"` Name string `json:"name"` Url string `json:"url"` CssId string `json:"sp_css"` }
CssInclude represents the json response for a CSS Include in ServiceNow.
type CssIncludeRelation ¶ added in v0.2.0
type CssIncludeRelation struct { BaseResult CssIncludeId string `json:"sp_css_include"` DependencyId string `json:"sp_dependency"` Order int `json:"order,string"` }
CssIncludeRelation represents the json response for a CssIncludeRelation in ServiceNow.
type CssIncludeRelationResults ¶ added in v0.2.0
type CssIncludeRelationResults struct {
Records []CssIncludeRelation `json:"records"`
}
CssIncludeRelationResults is the object returned by ServiceNow API when saving or retrieving records.
type CssIncludeResults ¶ added in v0.2.0
type CssIncludeResults struct {
Records []CssInclude `json:"records"`
}
CssIncludeResults is the object returned by ServiceNow API when saving or retrieving records.
type ErrorDetail ¶
ErrorDetail is the details of an error. Should be included in the json if status is not success.
type JsInclude ¶ added in v0.2.0
type JsInclude struct { BaseResult Source string `json:"source"` DisplayName string `json:"display_name"` Url string `json:"url"` UiScriptId string `json:"sys_ui_script"` }
JsInclude represents the json response for a Js Include in ServiceNow.
type JsIncludeRelation ¶ added in v0.2.0
type JsIncludeRelation struct { BaseResult JsIncludeId string `json:"sp_js_include"` DependencyId string `json:"sp_dependency"` Order int `json:"order,string"` }
JsIncludeRelation represents the json response for a JsIncludeRelation in ServiceNow.
type JsIncludeRelationResults ¶ added in v0.2.0
type JsIncludeRelationResults struct {
Records []JsIncludeRelation `json:"records"`
}
JsIncludeRelationResults is the object returned by ServiceNow API when saving or retrieving records.
type JsIncludeResults ¶ added in v0.2.0
type JsIncludeResults struct {
Records []JsInclude `json:"records"`
}
JsIncludeResults is the object returned by ServiceNow API when saving or retrieving records.
type RequestResults ¶ added in v0.2.0
type RequestResults interface {
// contains filtered or unexported methods
}
RequestResults is the interface for request responses. Each resource should implement it's own validate method that will be called by the base client.
type ServiceNowClient ¶
ServiceNowClient is the client used to interact with ServiceNow API.
func NewClient ¶
func NewClient(baseUrl string, username string, password string) *ServiceNowClient
NewClient is a factory method used to return a new ServiceNowClient.
func (*ServiceNowClient) CreateCssInclude ¶ added in v0.2.0
func (client *ServiceNowClient) CreateCssInclude(cssInclude *CssInclude) (*CssInclude, error)
CreateCssInclude creates a CSS Include in ServiceNow and returns the newly created CSS Include.
func (*ServiceNowClient) CreateCssIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) CreateCssIncludeRelation(relation *CssIncludeRelation) (*CssIncludeRelation, error)
CreateCssIncludeRelation creates a widget dependency relation in ServiceNow and returns the newly created relation.
func (*ServiceNowClient) CreateJsInclude ¶ added in v0.2.0
func (client *ServiceNowClient) CreateJsInclude(jsInclude *JsInclude) (*JsInclude, error)
CreateJsInclude creates a Js Include in ServiceNow and returns the newly created JS Include.
func (*ServiceNowClient) CreateJsIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) CreateJsIncludeRelation(relation *JsIncludeRelation) (*JsIncludeRelation, error)
CreateJsIncludeRelation creates a widget dependency relation in ServiceNow and returns the newly created relation.
func (*ServiceNowClient) CreateUiPage ¶
func (client *ServiceNowClient) CreateUiPage(uiPage *UiPage) (*UiPage, error)
CreateUiPage 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) CreateWidget ¶ added in v0.2.0
func (client *ServiceNowClient) CreateWidget(widget *Widget) (*Widget, error)
CreateWidget creates a new Widget in ServiceNow and returns the newly created page. The new page should include the GUID (sys_id) created in ServiceNow.
func (*ServiceNowClient) CreateWidgetDependency ¶ added in v0.2.0
func (client *ServiceNowClient) CreateWidgetDependency(widgetDependency *WidgetDependency) (*WidgetDependency, error)
CreateWidgetDependency creates a Widget Dependency in ServiceNow and returns the newly created widget dependency.
func (*ServiceNowClient) CreateWidgetDependencyRelation ¶ added in v0.2.0
func (client *ServiceNowClient) CreateWidgetDependencyRelation(relation *WidgetDependencyRelation) (*WidgetDependencyRelation, error)
CreateWidgetDependencyRelation creates a widget dependency relation in ServiceNow and returns the newly created relation.
func (*ServiceNowClient) DeleteCssInclude ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteCssInclude(id string) error
DeleteCssInclude deletes a CSS Include in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteCssIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteCssIncludeRelation(id string) error
DeleteCssIncludeRelation deletes a widget dependency relation in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteJsInclude ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteJsInclude(id string) error
DeleteJsInclude deletes a Js Include in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteJsIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteJsIncludeRelation(id string) error
DeleteJsIncludeRelation deletes a widget dependency relation in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteUiPage ¶
func (client *ServiceNowClient) DeleteUiPage(id string) error
DeleteUiPage deletes a UI Page in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteWidget ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteWidget(id string) error
DeleteWidget deletes a Widget in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteWidgetDependency ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteWidgetDependency(id string) error
DeleteWidgetDependency deletes a Widget Dependency in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) DeleteWidgetDependencyRelation ¶ added in v0.2.0
func (client *ServiceNowClient) DeleteWidgetDependencyRelation(id string) error
DeleteWidgetDependencyRelation deletes a widget dependency relation in ServiceNow with the corresponding sys_id.
func (*ServiceNowClient) GetCssInclude ¶ added in v0.2.0
func (client *ServiceNowClient) GetCssInclude(id string) (*CssInclude, error)
GetCssInclude retrieves a specific CSS Include in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetCssIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) GetCssIncludeRelation(id string) (*CssIncludeRelation, error)
GetCssIncludeRelation retrieves a specific CssIncludeRelation in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetJsInclude ¶ added in v0.2.0
func (client *ServiceNowClient) GetJsInclude(id string) (*JsInclude, error)
GetJsInclude retrieves a specific Js Include in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetJsIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) GetJsIncludeRelation(id string) (*JsIncludeRelation, error)
GetJsIncludeRelation retrieves a specific JsIncludeRelation in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetUiPage ¶
func (client *ServiceNowClient) GetUiPage(id string) (*UiPage, error)
GetUiPage retrieves a specific UI Page in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetWidget ¶ added in v0.2.0
func (client *ServiceNowClient) GetWidget(id string) (*Widget, error)
GetWidget retrieves a specific Widget in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetWidgetDependency ¶ added in v0.2.0
func (client *ServiceNowClient) GetWidgetDependency(id string) (*WidgetDependency, error)
GetWidgetDependency retrieves a specific Widget Dependency in ServiceNow with it's sys_id.
func (*ServiceNowClient) GetWidgetDependencyRelation ¶ added in v0.2.0
func (client *ServiceNowClient) GetWidgetDependencyRelation(id string) (*WidgetDependencyRelation, error)
GetWidgetDependencyRelation retrieves a specific widget dependency relation in ServiceNow with it's sys_id.
func (*ServiceNowClient) UpdateCssInclude ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateCssInclude(cssInclude *CssInclude) error
UpdateCssInclude updates a CSS Include in ServiceNow.
func (*ServiceNowClient) UpdateCssIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateCssIncludeRelation(relation *CssIncludeRelation) error
UpdateCssIncludeRelation updates a widget dependency relation in ServiceNow.
func (*ServiceNowClient) UpdateJsInclude ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateJsInclude(jsInclude *JsInclude) error
UpdateJsInclude updates a Js Include in ServiceNow.
func (*ServiceNowClient) UpdateJsIncludeRelation ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateJsIncludeRelation(relation *JsIncludeRelation) error
UpdateJsIncludeRelation updates a widget dependency relation in ServiceNow.
func (*ServiceNowClient) UpdateUiPage ¶
func (client *ServiceNowClient) UpdateUiPage(uiPage *UiPage) error
UpdateUiPage updates a UI Page in ServiceNow.
func (*ServiceNowClient) UpdateWidget ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateWidget(widget *Widget) error
UpdateWidget updates a Widget in ServiceNow.
func (*ServiceNowClient) UpdateWidgetDependency ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateWidgetDependency(widgetDependency *WidgetDependency) error
UpdateWidgetDependency updates a Widget Dependency in ServiceNow.
func (*ServiceNowClient) UpdateWidgetDependencyRelation ¶ added in v0.2.0
func (client *ServiceNowClient) UpdateWidgetDependencyRelation(relation *WidgetDependencyRelation) error
UpdateWidgetDependencyRelation updates a widget dependency relation in ServiceNow.
type UiPage ¶
type UiPage struct { BaseResult 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"` }
UiPage is the json response for a UI page in ServiceNow.
type UiPageResults ¶
type UiPageResults struct {
Records []UiPage `json:"records"`
}
UiPageResults is the object returned by ServiceNow API when saving or retrieving records.
type Widget ¶ added in v0.2.0
type Widget struct { BaseResult CustomId string `json:"id"` Name string `json:"name"` Template string `json:"template"` Css string `json:"css"` Public bool `json:"public,string"` Roles string `json:"roles"` Link string `json:"link"` Description string `json:"description"` ClientScript string `json:"client_script"` ServerScript string `json:"script"` DemoData string `json:"demo_data"` OptionSchema string `json:"option_schema"` HasPreview bool `json:"has_preview,string"` DataTable string `json:"data_table"` ControllerAs string `json:"controller_as"` }
Widget is the json response for a Widget in ServiceNow.
type WidgetDependency ¶ added in v0.2.0
type WidgetDependency struct { BaseResult Name string `json:"name"` Module string `json:"module"` PageLoad bool `json:"page_load,string"` }
WidgetDependency represents the json response for a Widget Dependency in ServiceNow.
type WidgetDependencyRelation ¶ added in v0.2.0
type WidgetDependencyRelation struct { BaseResult DependencyId string `json:"sp_dependency"` WidgetId string `json:"sp_widget"` }
WidgetDependencyRelation represents the json response for a widget dependency relation in ServiceNow.
type WidgetDependencyRelationResults ¶ added in v0.2.0
type WidgetDependencyRelationResults struct {
Records []WidgetDependencyRelation `json:"records"`
}
WidgetDependencyRelationResults is the object returned by ServiceNow API when saving or retrieving records.
type WidgetDependencyResults ¶ added in v0.2.0
type WidgetDependencyResults struct {
Records []WidgetDependency `json:"records"`
}
WidgetDependencyResults is the object returned by ServiceNow API when saving or retrieving records.
type WidgetResults ¶ added in v0.2.0
type WidgetResults struct {
Records []Widget `json:"records"`
}
WidgetResults is the object returned by ServiceNow API when saving or retrieving records.