client

package
v0.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EndpointACL = "sys_security_acl.do"

EndointACL is the endpoint to manage ACL records.

View Source
const EndpointAlias = "sys_alias.do"

EndpointAlias is the endpoint to manage connection and credential alias records.

View Source
const EndpointApplication = "sys_app.do"

EndpointApplication is the endpoint to manage application records.

View Source
const EndpointApplicationCategory = "sys_app_category.do"

EndpointApplicationCategory is the endpoint to manage application category records.

View Source
const EndpointApplicationMenu = "sys_app_application.do"

EndpointApplicationMenu is the endpoint to manage application menu records.

View Source
const EndpointApplicationModule = "sys_app_module.do"

EndpointApplicationModule is the endpoint to manage application modules records.

View Source
const EndpointBasicAuthCredential = "basic_auth_credentials.do"

EndpointBasicAuthCredential is the endpoint to manage basic auth credential records.

View Source
const EndpointCSSInclude = "sp_css_include.do"

EndpointCSSInclude is the endpoint to manage CSS includes records.

View Source
const EndpointCSSIncludeRelation = "m2m_sp_dependency_css_include.do"

EndpointCSSIncludeRelation is the endpoint to manage CSS include relation records.

View Source
const EndpointContentCSS = "content_css.do"

EndpointContentCSS is the endpoint to manage content css records.

View Source
const EndpointDBTable = "sys_db_object.do"

EndpointDBTable is the endpoint to manage DB Table records.

View Source
const EndpointExtensionPoint = "sys_extension_point.do"

EndpointExtensionPoint is the endpoint to manage Extension Point records.

View Source
const EndpointHttpConnection = "http_connection.do"

EndpointHttpConnection is the endpoint to manage system property categories records.

View Source
const EndpointJsInclude = "sp_js_include.do"

EndpointJsInclude is the endpoint to manage JS Include records.

View Source
const EndpointJsIncludeRelation = "m2m_sp_dependency_js_include.do"

EndpointJsIncludeRelation is the endpoint to manage JS Include Relation records.

View Source
const EndpointOAuthEntity = "oauth_entity.do"

EndpointOAuthEntity is the endpoint to manage oauth entity records.

View Source
const EndpointQuestionChoice = "question_choice.do"

EndpointQuestionChoice is the endpoint to manage question choice for service catalog

View Source
const EndpointRestMessage = "sys_rest_message.do"

EndpointRestMessage is the endpoint to manage REST message records.

View Source
const EndpointRestMessageHeader = "sys_rest_message_headers.do"

EndpointRestMessageHeader is the endpoint to manage REST message header records.

View Source
const EndpointRestMethod = "sys_rest_message_fn.do"

EndpointRestMethod is the endpoint to manage REST message method records.

View Source
const EndpointRestMethodHeader = "sys_rest_message_fn_headers.do"

EndpointRestMethodHeader is the endpoint to manage REST Message method header records.

View Source
const EndpointRole = "sys_user_role.do"

EndpointRole is the endpoint to manage role records.

View Source
const EndpointScriptInclude = "sys_script_include.do"

EndpointScriptInclude is the endpoint to manage script include records.

View Source
const EndpointScriptedRestApi = "sys_ws_definition.do"

EndpointScriptedRestApi is the endpoint to manage Scripted Rest Api records.

View Source
const EndpointScriptedRestResource = "sys_ws_operation.do"

EndpointScriptedRestResource is the endpoint to manage Scripted Rest Resources records.

View Source
const EndpointServer = "cmdb_ci_server.do"

EndpointServer is the endpoint to manage server entried in the CDMB.

View Source
const EndpointServiceCatalog = "sc_catalog.do"

EndpointServiceCatalog is the endpoint to manage service catalog records.

View Source
const EndpointServiceCatalogCategory = "sc_category.do"

EndpointServiceCatalogCategory is the endpoint to manage service catalog categories records.

View Source
const EndpointServiceCatalogItem = "sc_cat_item.do"

EndpointServiceCatalogItem is the endpoint to manage service catalog item records.

View Source
const EndpointServiceCatalogVariable = "item_option_new.do"

EndpointServiceCatalogVariable is the endpoint to manage service catalog variables.

View Source
const EndpointSystemProperty = "sys_properties.do"

EndpointSystemProperty is the endpoint to manage system property records.

View Source
const EndpointSystemPropertyCategory = "sys_properties_category.do"

EndpointSystemPropertyCategory is the endpoint to manage system property categories records.

View Source
const EndpointSystemPropertyRelation = "sys_properties_category_m2m.do"

EndpointSystemPropertyRelation is the endpoint to manage system property category relation records.

View Source
const EndpointUIMacro = "sys_ui_macro.do"

EndpointUIMacro is the endpoint to manage UI Macro records.

View Source
const EndpointUIPage = "sys_ui_page.do"

EndpointUIPage is the endpoint to manage UI Pages records.

View Source
const EndpointUIScript = "sys_ui_script.do"

EndpointUIScript is the endpoint to manage UI Script records.

View Source
const EndpointWidget = "sp_widget.do"

EndpointWidget is the endpoint to manage widget records.

View Source
const EndpointWidgetDependency = "sp_dependency.do"

EndpointWidgetDependency is the endpoint to manage widget dependency records.

View Source
const EndpointWidgetDependencyRelation = "m2m_sp_widget_dependency.do"

EndpointWidgetDependencyRelation is the endpoint to manage widget dependency relation records.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	BaseResult
	Type           string `json:"type"`
	Operation      string `json:"operation"`
	AdminOverrides bool   `json:"admin_overrides,string"`
	Name           string `json:"name"`
	Description    string `json:"description,omitempty"`
	Active         bool   `json:"active,string"`
	Advanced       bool   `json:"advanced,string"`
	Condition      string `json:"condition,omitempty"`
	Script         string `json:"script,omitempty"`
}

ACL is the json response for an ACL in ServiceNow.

type Alias

type Alias struct {
	BaseResult
	Name                  string `json:"name"`
	ParentAlias           string `json:"parent"`
	Type                  string `json:"type"`
	ConnectionType        string `json:"connection_type"`
	MultipleActions       bool   `json:"multiple_actions,string"`
	RetryPolicy           string `json:"retry_policy"`
	ConfigurationTemplate string `json:"configuration_template"`
}

Alias is the json response for a connection and credential in ServiceNow.

type Application

type Application struct {
	BaseResult
	Name    string `json:"name"`
	Scope   string `json:"scope"`
	Version string `json:"version"`
}

Application is the json response for an application in ServiceNow.

type ApplicationCategory

type ApplicationCategory struct {
	BaseResult
	Name  string `json:"name"`
	Order string `json:"default_order"`
	Style string `json:"style"`
}

ApplicationCategory represents the json response for a Application Category in ServiceNow.

type ApplicationMenu

type ApplicationMenu struct {
	BaseResult
	Title       string `json:"title"`
	Description string `json:"description"`
	Hint        string `json:"hint"`
	DeviceType  string `json:"device_type"`
	Order       int    `json:"order,string"`
	Roles       string `json:"roles"`
	CategoryID  string `json:"category"`
	Active      bool   `json:"active,string"`
}

ApplicationMenu is the json response for an application menu in ServiceNow.

type ApplicationModule

type ApplicationModule struct {
	BaseResult
	Title             string `json:"title"`
	MenuID            string `json:"application"`
	Hint              string `json:"hint"`
	Order             int    `json:"order,string"`
	Roles             string `json:"roles"`
	Active            bool   `json:"active,string"`
	OverrideMenuRoles bool   `json:"override_menu_roles,string"`
	LinkType          string `json:"link_type"`
	Arguments         string `json:"query"`
	WindowName        string `json:"window_name"`
	TableName         string `json:"name"`
}

ApplicationModule is the json response for an application menu in ServiceNow.

type BaseResult

type BaseResult struct {
	ID               string       `json:"sys_id,omitempty"`
	ProtectionPolicy string       `json:"sys_policy,omitempty"`
	Scope            string       `json:"sys_scope,omitempty"`
	Status           string       `json:"__status,omitempty"`
	Error            *ErrorDetail `json:"__error,omitempty"`
}

BaseResult is representing the default properties of all results.

func (BaseResult) GetError

func (record BaseResult) GetError() *ErrorDetail

GetError returns the Error of a BaseRecord, if any.

func (BaseResult) GetID

func (record BaseResult) GetID() string

GetID returns the ID of a BaseRecord.

func (BaseResult) GetScope

func (record BaseResult) GetScope() string

GetScope returns the Scope of a BaseRecord.

func (BaseResult) GetStatus

func (record BaseResult) GetStatus() string

GetStatus returns the Status of a BaseRecord.

type BaseResultList

type BaseResultList struct {
	Records []json.RawMessage
}

BaseResultList represents the response from the API. Records are always returned inside an array.

type BasicAuthCredential

type BasicAuthCredential struct {
	BaseResult
	Name            string `json:"name"`
	Order           string `json:"order"`
	UserName        string `json:"user_name"`
	Password        string `json:"password"`
	CredentialAlias string `json:"tag"`
}

BasicAuthCredential is the json response for a basic auth credential in ServiceNow.

type CSSInclude

type CSSInclude struct {
	BaseResult
	Source       string `json:"source"`
	Name         string `json:"name"`
	URL          string `json:"url"`
	StyleSheetID string `json:"sp_css"`
}

CSSInclude represents the json response for a CSS Include in ServiceNow.

type CSSIncludeRelation

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 Client

type Client struct {
	BaseURL string
	Auth    string
}

Client is the client used to interact with ServiceNow API.

func NewClient

func NewClient(baseURL string, username string, password string) *Client

NewClient is a factory method used to return a new ServiceNowClient.

func (*Client) CreateObject

func (client *Client) CreateObject(endpoint string, objectToCreate Record) error

CreateObject creates a new object in ServiceNow, validates the response and fills the object with properties received from the service.

func (*Client) DeleteObject

func (client *Client) DeleteObject(endpoint string, id string) error

DeleteObject deletes an object using a specific endpoing and sys_id.

func (*Client) GetObject

func (client *Client) GetObject(endpoint string, id string, responseObjectOut Record) error

GetObject retrieves an object via a specific endpoint with a GET method and a specified sys_id. The response is parsed and fills the object in parameters. responseObjectOut parameter must be a pointer.

func (*Client) GetObjectByName

func (client *Client) GetObjectByName(endpoint string, name string, responseObjectOut Record) error

GetObjectByName retrieves an object via its name attribute.

func (*Client) GetObjectByTitle

func (client *Client) GetObjectByTitle(endpoint string, title string, responseObjectOut Record) error

GetObjectByTitle retrieves an object via its title attribute.

func (*Client) UpdateObject

func (client *Client) UpdateObject(endpoint string, object Record) error

UpdateObject updates an object using a specific endpoint, sys_id and object data.

type ContentCSS

type ContentCSS struct {
	BaseResult
	Name  string `json:"name"`
	Type  string `json:"type"`
	URL   string `json:"url"`
	Style string `json:"style"`
}

ContentCSS represents the json response for a Content Management Style Sheet in ServiceNow.

type DBTable

type DBTable struct {
	BaseResult
	Label                string `json:"label"`
	UserRole             string `json:"user_role"`
	Access               string `json:"access"`
	ReadAccess           bool   `json:"read_access,string"`
	CreateAccess         bool   `json:"create_access,string"`
	AlterAccess          bool   `json:"alter_access,string"`
	DeleteAccess         bool   `json:"delete_access,string"`
	WebServiceAccess     bool   `json:"ws_access,string"`
	ConfigurationAccess  bool   `json:"configuration_access,string"`
	Extendable           bool   `json:"is_extendable,string"`
	LiveFeed             bool   `json:"live_feed_enabled,string"`
	CreateAccessControls bool   `json:"create_access_controls,string"`
	CreateModule         bool   `json:"create_module,string"`
	CreateMobileModule   bool   `json:"create_mobile_module,string"`
	Name                 string `json:"name,omitempty"`
}

DBTable is the json response for a Table in ServiceNow.

type ErrorDetail

type ErrorDetail struct {
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

ErrorDetail is the details of an error. Should be included in the json if status is not success.

type ExtensionPoint

type ExtensionPoint struct {
	BaseResult
	Name          string `json:"name"`
	RestrictScope bool   `json:"restrict_scope,string"`
	Description   string `json:"description"`
	Example       string `json:"example"`
	APIName       string `json:"api_name,omitempty"`
}

ExtensionPoint represents the json response for a Extension Point in ServiceNow.

type HttpConnection

type HttpConnection struct {
	BaseResult
	Name            string `json:"name"`
	Active          bool   `json:"active,string"`
	Credential      string `json:"credential"`
	ConnectionAlias string `json:"connection_alias"`
	ConnectionUrl   string `json:"connection_url"`
	UseMidServer    bool   `json:"use_mid,string"`
	MidSelection    string `json:"mid_selection"`
	MidServer       string `json:"mid_server"`
}

HttpConnection is the json response for a system property in ServiceNow.

type JsInclude

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

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 OAuthEntity

type OAuthEntity struct {
	BaseResult
	Name                 string `json:"name"`
	ClientUUID           string `json:"client_uuid,omitempty"`
	ClientID             string `json:"client_id,omitempty"`
	AccessTokenLifespan  int    `json:"access_token_lifespan,string"`
	RefreshTokenLifespan int    `json:"refresh_token_lifespan,string"`
	RedirectURL          string `json:"redirect_url"`
	LogoURL              string `json:"logo_url"`
	Access               string `json:"access"`
}

OAuthEntity is the json response for a OAuthEntity in ServiceNow.

type QuestionChoice

type QuestionChoice struct {
	BaseResult
	Text           string `json:"text"`
	Value          string `json:"value"`
	Question       string `json:"question"`
	Order          string `json:"order"`
	Price          string `json:"misc"`
	RecurringPrice string `json:"rec_misc"`
	Inactive       bool   `json:"inactive,string"`
}

QuestionChoice is the json response for a question choice in ServiceNow.

type Record

type Record interface {
	GetID() string
	GetScope() string
	GetStatus() string
	GetError() *ErrorDetail
}

Record is the interface for any BaseResult.

type RestMessage

type RestMessage struct {
	BaseResult
	Name               string `json:"name"`
	Description        string `json:"description"`
	RestEndpoint       string `json:"rest_endpoint"`
	Access             string `json:"access"`
	AuthenticationType string `json:"authentication_type"`
}

RestMessage represents the json response for a REST Message in ServiceNow.

type RestMessageHeader

type RestMessageHeader struct {
	BaseResult
	Name      string `json:"name"`
	Value     string `json:"value"`
	MessageID string `json:"rest_message"`
}

RestMessageHeader represents the json response for a HTTP header in ServiceNow.

type RestMethod

type RestMethod struct {
	BaseResult
	Name               string `json:"function_name"`
	MessageID          string `json:"rest_message"`
	HTTPMethod         string `json:"http_method"`
	RestEndpoint       string `json:"rest_endpoint"`
	AuthenticationType string `json:"authentication_type"`
	QualifiedName      string `json:"qualified_name,omitempty"`
}

RestMethod represents the json response for a HTTP method in ServiceNow.

type RestMethodHeader

type RestMethodHeader struct {
	BaseResult
	Name     string `json:"name"`
	Value    string `json:"value"`
	MethodID string `json:"rest_message_function"`
}

RestMethodHeader represents the json response for a HTTP header in ServiceNow.

type Role

type Role struct {
	BaseResult
	Name              string `json:"name,omitempty"`
	Description       string `json:"description"`
	ElevatedPrivilege bool   `json:"elevated_privilege,string"`
	Suffix            string `json:"suffix"`
	AssignableBy      string `json:"assignable_by"`
}

Role is the json response for a role in ServiceNow.

type ScriptInclude

type ScriptInclude struct {
	BaseResult
	Name           string `json:"name"`
	ClientCallable bool   `json:"client_callable,string"`
	Description    string `json:"description"`
	Script         string `json:"script"`
	Active         bool   `json:"active,string"`
	Access         string `json:"access"`
	APIName        string `json:"api_name,omitempty"`
}

ScriptInclude is the json response for a Script Include in ServiceNow.

type ScriptedRestApi

type ScriptedRestApi struct {
	BaseResult
	Active             bool   `json:"active,string"`
	Consumes           string `json:"consumes,omitempty"`
	ConsumesCustomized bool   `json:"consumes_customized,string"`
	EnforceACL         string `json:"enforce_acl,omitempty"`
	Name               string `json:"name"`
	Produces           string `json:"produces,omitempty"`
	ProducesCustomized bool   `json:"produces_customized,string"`
	ServiceId          string `json:"service_id,omitempty"`
	BaseURI            string `json:"base_uri,omitempty"`
	Namespace          string `json:"namespace,omitempty"`
	DocLink            string `json:"doc_link,omitempty"`
	ShortDescription   string `json:"short_description,omitempty"`
}

EndpointScriptedRestApi is the json response for a Scripted Rest Api in ServiceNow.

type ScriptedRestResource

type ScriptedRestResource struct {
	BaseResult
	Name                     string `json:"name"`
	Active                   bool   `json:"active,string"`
	EnforceACL               string `json:"enforce_acl,omitempty"`
	RequiresACLAuthorization bool   `json:"requires_acl_authorization,string"`
	RequiresAuthentication   bool   `json:"requires_authentication,string"`
	RequiresSNCInternalRole  bool   `json:"requires_snc_internal_role,string"`
	Produces                 string `json:"produces,omitempty"`
	ProducesCustomized       bool   `json:"produces_customized,string"`
	ShortDescription         string `json:"short_description,omitempty"`
	OperationScript          string `json:"operation_script"`
	RelativePath             string `json:"relative_path,omitempty"`
	RequestExample           string `json:"request_example,omitempty"`
	HTTPMethod               string `json:"http_method"`
	Consumes                 string `json:"consumes,omitempty"`
	ConsumesCustomized       bool   `json:"consumes_customized,string"`
	OperationURI             string `json:"operation_uri,omitempty"`
	WebServiceDefinition     string `json:"web_service_definition,omitempty"`
	WebServiceVersion        string `json:"web_service_version,omitempty"`
}

EndpointScriptedRestResource is the json response for a Scripted Rest Resources in ServiceNow.

type Server

type Server struct {
	BaseResult
	Name            string `json:"name"`
	Company         string `json:"company"`
	AssetTag        string `json:"asset_tag"`
	SerialNumber    string `json:"serial_number"`
	Manufacturer    string `json:"manufacturer"`
	ModelId         string `json:"model_id"`
	AssignedTo      string `json:"assigned_to"`
	OsDomain        string `json:"os_domain"`
	Ram             string `json:"ram"`
	OperatingSystem string `json:"os"`
	CpuManufacturer string `json:"cpu_manufacturer"`
	OsVersion       string `json:"os_version"`
	CpuType         string `json:"cpu_type"`
	OsServicePack   string `json:"os_service_pack"`
	CpuSpeed        string `json:"cpu_speed"`
	DnsDomain       string `json:"dns_domain"`
	CpuCount        string `json:"cpu_count"`
	DiskSpace       string `json:"disk_space"`
	CpuCoreCount    string `json:"cpu_core_count"`
	Description     string `json:"short_description"`
	IpAddress       string `json:"ip_address"`
}

Server is the json response for a cmdb server entry in ServiceNow.

type ServiceCatalog

type ServiceCatalog struct {
	BaseResult
	Title                   string `json:"title"`
	Manager                 string `json:"manager"`
	Editors                 string `json:"editors"`
	Description             string `json:"description"`
	BackgroundColor         string `json:"background_color"`
	DesktopImage            string `json:"desktop_image"`
	DesktopHomePage         string `json:"desktop_home_page"`
	DesktopContinueShopping string `json:"desktop_continue_shopping"`
	Active                  bool   `json:"active,string"`
	EnableWishList          bool   `json:"enable_wish_list,string"`
}

ServiceCatalog is the json response for a service catalog in ServiceNow.

type ServiceCatalogCategory

type ServiceCatalogCategory struct {
	BaseResult
	Title        string `json:"title"`
	Catalog      string `json:"sc_catalog"`
	Location     string `json:"location"`
	Description  string `json:"description"`
	DesktopImage string `json:"image"`
	Icon         string `json:"icon"`
	HeaderIcon   string `json:"header_icon"`
	Parent       string `json:"parent"`
	Active       bool   `json:"active,string"`
}

ServiceCatalogCategory is the json response for a service catalog category in ServiceNow.

type ServiceCatalogItem

type ServiceCatalogItem struct {
	BaseResult
	Name                string `json:"name"`
	ServiceCatalogs     string `json:"sc_catalogs"`
	Category            string `json:"category"`
	ShortDescription    string `json:"short_description"`
	Description         string `json:"description"`
	HideAddToCart       bool   `json:"no_cart_v2,string"`
	HideQuantity        bool   `json:"no_quantity_v2,string"`
	HideDeliveryTime    bool   `json:"no_delivery_time_v2,string"`
	HideAddToWishlist   bool   `json:"no_wishlist_v2,string"`
	HideAttachment      bool   `json:"no_attachment_v2,string"`
	MandatoryAttachment bool   `json:"mandatory_attachment,string"`
	Active              bool   `json:"active,string"`
}

ServiceCatalogItem is the json response for a service catalog item in ServiceNow.

type ServiceCatalogVariable

type ServiceCatalogVariable struct {
	BaseResult
	Name               string `json:"name"`
	Question           string `json:"question_text"`
	Tooltip            string `json:"tooltip"`
	HelpTag            string `json:"help_tag"`
	HelpText           string `json:"help_text"`
	Instructions       string `json:"instructions"`
	DefaultValue       string `json:"default_value"`
	Type               string `json:"type"`
	CatalogItem        string `json:"cat_item"`
	Order              string `json:"order"`
	ListTable          string `json:"list_table"`
	LookupTable        string `json:"lookup_table"`
	LookupValue        string `json:"lookup_value"`
	Reference          string `json:"reference"`
	ReferenceQualifier string `json:"reference_qual"`
	ShowHelp           bool   `json:"show_help,string"`
	Mandatory          bool   `json:"mandatory,string"`
	ReadOnly           bool   `json:"read_only,string"`
	Hidden             bool   `json:"hidden,string"`
	Active             bool   `json:"active,string"`
}

ServiceCatalogVariable is the json response for a service catalog variable in ServiceNow.

type ServiceNowClient

type ServiceNowClient interface {
	GetObject(string, string, Record) error
	GetObjectByName(string, string, Record) error
	GetObjectByTitle(string, string, Record) error
	CreateObject(string, Record) error
	UpdateObject(string, Record) error
	DeleteObject(string, string) error
}

ServiceNowClient defines possible methods to call on the ServiceNowClient.

type SystemProperty

type SystemProperty struct {
	BaseResult
	Suffix      string `json:"suffix"`
	Type        string `json:"type"`
	Choices     string `json:"choices"`
	IsPrivate   bool   `json:"is_private,string"`
	IgnoreCache bool   `json:"ignore_cache,string"`
	Description string `json:"description"`
	WriteRoles  string `json:"write_roles"`
	ReadRoles   string `json:"read_roles"`
	Name        string `json:"name,omitempty"`
	Value       string `json:"value,omitempty"`
}

SystemProperty is the json response for a system property in ServiceNow.

type SystemPropertyCategory

type SystemPropertyCategory struct {
	BaseResult
	Name      string `json:"name"`
	TitleHTML string `json:"title"`
}

SystemPropertyCategory is the json response for a system property in ServiceNow.

type SystemPropertyRelation

type SystemPropertyRelation struct {
	BaseResult
	CategoryID string `json:"category"`
	PropertyID string `json:"property"`
	Order      string `json:"order,omitempty"`
}

SystemPropertyRelation is the json response for a system property relation in ServiceNow.

type UIMacro

type UIMacro struct {
	BaseResult
	Name        string `json:"name"`
	Description string `json:"description"`
	APIName     string `json:"scoped_name"`
	XML         string `json:"xml"`
	Active      bool   `json:"active,string"`
}

UIMacro is the json response for a UI Macro 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"`
	Endpoint         string `json:"endpoint,omitempty"`
}

UIPage is the json response for a UI page in ServiceNow.

type UIScript

type UIScript struct {
	BaseResult
	Name        string `json:"script_name"`
	APIName     string `json:"name,omitempty"`
	Description string `json:"description"`
	Script      string `json:"script"`
	Active      bool   `json:"active,string"`
	UIType      string `json:"ui_type"` // All: 10, Mobile: 1, Desktop 0
}

UIScript is the json response for a UI Script in ServiceNow.

type Widget

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL