servicenow

package
v0.0.0-...-26855d9 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysparmActionInsert         = "insert"
	SysparmActionInsertMultiple = "insertMultiple"
	SysparmActionUpdate         = "update"
	SysparmActionDelete         = "deleteRecord"
	SysparmActionDeleteMultiple = "deleteMultiple"
)

Variables

This section is empty.

Functions

func Stringify

func Stringify(message interface{}) string

Stringify attempts to create a reasonable string representation of types in the GitHub library. It does things like resolve pointers to their values and omits struct fields with nil values.

Types

type BasicAuthTransport

type BasicAuthTransport struct {
	Username string // ServiceNow username
	Password string // ServiceNow password

	// Transport is the underlying HTTP transport to use when making requests.
	// It will default to http.DefaultTransport if nil.
	Transport http.RoundTripper
}

BasicAuthTransport is an http.RoundTripper that authenticates all requests using HTTP Basic Authentication with the provided username and password.

func (*BasicAuthTransport) Client

func (t *BasicAuthTransport) Client() *http.Client

Client returns an *http.Client that makes requests that are authenticated using HTTP Basic Authentication.

func (*BasicAuthTransport) RoundTrip

func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

type ChangeRequest

type ChangeRequest struct {
	Status                         *string `json:"__status,omitempty"`
	Active                         *string `json:"active,omitempty"`
	ActivityDue                    *string `json:"activity_due,omitempty"`
	AdditionalAssigneeList         *string `json:"additional_assignee_list,omitempty"`
	Approval                       *string `json:"approval,omitempty"`
	ApprovalHistory                *string `json:"approval_history,omitempty"`
	ApprovalSet                    *string `json:"approval_set,omitempty"`
	AssignedTo                     *string `json:"assigned_to,omitempty"`
	AssignmentGroup                *string `json:"assignment_group,omitempty"`
	BackoutPlan                    *string `json:"backout_plan,omitempty"`
	BusinessDuration               *string `json:"business_duration,omitempty"`
	BusinessService                *string `json:"business_service,omitempty"`
	CabDate                        *string `json:"cab_date,omitempty"`
	CabDelegate                    *string `json:"cab_delegate,omitempty"`
	CabRecommendation              *string `json:"cab_recommendation,omitempty"`
	CabRequired                    *string `json:"cab_required,omitempty"`
	CalendarDuration               *string `json:"calendar_duration,omitempty"`
	Category                       *string `json:"category,omitempty"`
	ChangePlan                     *string `json:"change_plan,omitempty"`
	ChgModel                       *string `json:"chg_model,omitempty"`
	CloseCode                      *string `json:"close_code,omitempty"`
	CloseNotes                     *string `json:"close_notes,omitempty"`
	ClosedAt                       *string `json:"closed_at,omitempty"`
	ClosedBy                       *string `json:"closed_by,omitempty"`
	CmdbCi                         *string `json:"cmdb_ci,omitempty"`
	Comments                       *string `json:"comments,omitempty"`
	CommentsAndWorkNotes           *string `json:"comments_and_work_notes,omitempty"`
	Company                        *string `json:"company,omitempty"`
	ConflictLastRun                *string `json:"conflict_last_run,omitempty"`
	ConflictStatus                 *string `json:"conflict_status,omitempty"`
	ContactType                    *string `json:"contact_type,omitempty"`
	CorrelationDisplay             *string `json:"correlation_display,omitempty"`
	CorrelationID                  *string `json:"correlation_id,omitempty"`
	Description                    *string `json:"description,omitempty"`
	DueDate                        *string `json:"due_date,omitempty"`
	EndDate                        *string `json:"end_date,omitempty"`
	Escalation                     *string `json:"escalation,omitempty"`
	ExpectedStart                  *string `json:"expected_start,omitempty"`
	FollowUp                       *string `json:"follow_up,omitempty"`
	GroupList                      *string `json:"group_list,omitempty"`
	Impact                         *string `json:"impact,omitempty"`
	ImplementationPlan             *string `json:"implementation_plan,omitempty"`
	Justification                  *string `json:"justification,omitempty"`
	Knowledge                      *string `json:"knowledge,omitempty"`
	Location                       *string `json:"location,omitempty"`
	MadeSLA                        *string `json:"made_sla,omitempty"`
	Number                         *string `json:"number,omitempty"`
	OnHold                         *string `json:"on_hold,omitempty"`
	OnHoldReason                   *string `json:"on_hold_reason,omitempty"`
	OnHoldTask                     *string `json:"on_hold_task,omitempty"`
	OpenedAt                       *string `json:"opened_at,omitempty"`
	OpenedBy                       *string `json:"opened_by,omitempty"`
	Order                          *string `json:"order,omitempty"`
	OutsideMaintenanceSchedule     *string `json:"outside_maintenance_schedule,omitempty"`
	Parent                         *string `json:"parent,omitempty"`
	Phase                          *string `json:"phase,omitempty"`
	PhaseState                     *string `json:"phase_state,omitempty"`
	Priority                       *string `json:"priority,omitempty"`
	ProductionSystem               *string `json:"production_system,omitempty"`
	Reason                         *string `json:"reason,omitempty"`
	ReassignmentCount              *string `json:"reassignment_count,omitempty"`
	RequestedBy                    *string `json:"requested_by,omitempty"`
	RequestedByDate                *string `json:"requested_by_date,omitempty"`
	ReviewComments                 *string `json:"review_comments,omitempty"`
	ReviewDate                     *string `json:"review_date,omitempty"`
	ReviewStatus                   *string `json:"review_status,omitempty"`
	Risk                           *string `json:"risk,omitempty"`
	RiskImpactAnalysis             *string `json:"risk_impact_analysis,omitempty"`
	RiskValue                      *string `json:"risk_value,omitempty"`
	RouteReason                    *string `json:"route_reason,omitempty"`
	Scope                          *string `json:"scope,omitempty"`
	ServiceOffering                *string `json:"service_offering,omitempty"`
	ShortDescription               *string `json:"short_description,omitempty"`
	Skills                         *string `json:"skills,omitempty"`
	SLADue                         *string `json:"sla_due,omitempty"`
	SnEsignDocument                *string `json:"sn_esign_document,omitempty"`
	SnEsignEsignatureConfiguration *string `json:"sn_esign_esignature_configuration,omitempty"`
	StartDate                      *string `json:"start_date,omitempty"`
	State                          *string `json:"state,omitempty"`
	StdChangeProducerVersion       *string `json:"std_change_producer_version,omitempty"`
	SysClassName                   *string `json:"sys_class_name,omitempty"`
	SysCreatedBy                   *string `json:"sys_created_by,omitempty"`
	SysCreatedOn                   *string `json:"sys_created_on,omitempty"`
	SysDomain                      *string `json:"sys_domain,omitempty"`
	SysDomainPath                  *string `json:"sys_domain_path,omitempty"`
	SysID                          *string `json:"sys_id,omitempty"`
	SysModCount                    *string `json:"sys_mod_count,omitempty"`
	SysTags                        *string `json:"sys_tags,omitempty"`
	SysUpdatedBy                   *string `json:"sys_updated_by,omitempty"`
	SysUpdatedOn                   *string `json:"sys_updated_on,omitempty"`
	TaskEffectiveNumber            *string `json:"task_effective_number,omitempty"`
	TestPlan                       *string `json:"test_plan,omitempty"`
	TimeWorked                     *string `json:"time_worked,omitempty"`
	Type                           *string `json:"type,omitempty"`
	Unauthorized                   *string `json:"unauthorized,omitempty"`
	UniversalRequest               *string `json:"universal_request,omitempty"`
	UponApproval                   *string `json:"upon_approval,omitempty"`
	UponReject                     *string `json:"upon_reject,omitempty"`
	Urgency                        *string `json:"urgency,omitempty"`
	UserInput                      *string `json:"user_input,omitempty"`
	WatchList                      *string `json:"watch_list,omitempty"`
	WorkEnd                        *string `json:"work_end,omitempty"`
	WorkNotes                      *string `json:"work_notes,omitempty"`
	WorkNotesList                  *string `json:"work_notes_list,omitempty"`
	WorkStart                      *string `json:"work_start,omitempty"`

	Extra map[string]string `json:"-"`
}

ChangeRequest represents a ServiceNow change.

func (*ChangeRequest) GetActive

func (c *ChangeRequest) GetActive() string

GetActive returns the Active field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetActivityDue

func (c *ChangeRequest) GetActivityDue() string

GetActivityDue returns the ActivityDue field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetAdditionalAssigneeList

func (c *ChangeRequest) GetAdditionalAssigneeList() string

GetAdditionalAssigneeList returns the AdditionalAssigneeList field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetApproval

func (c *ChangeRequest) GetApproval() string

GetApproval returns the Approval field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetApprovalHistory

func (c *ChangeRequest) GetApprovalHistory() string

GetApprovalHistory returns the ApprovalHistory field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetApprovalSet

func (c *ChangeRequest) GetApprovalSet() string

GetApprovalSet returns the ApprovalSet field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetAssignedTo

func (c *ChangeRequest) GetAssignedTo() string

GetAssignedTo returns the AssignedTo field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetAssignmentGroup

func (c *ChangeRequest) GetAssignmentGroup() string

GetAssignmentGroup returns the AssignmentGroup field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetBackoutPlan

func (c *ChangeRequest) GetBackoutPlan() string

GetBackoutPlan returns the BackoutPlan field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetBusinessDuration

func (c *ChangeRequest) GetBusinessDuration() string

GetBusinessDuration returns the BusinessDuration field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetBusinessService

func (c *ChangeRequest) GetBusinessService() string

GetBusinessService returns the BusinessService field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCabDate

func (c *ChangeRequest) GetCabDate() string

GetCabDate returns the CabDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCabDelegate

func (c *ChangeRequest) GetCabDelegate() string

GetCabDelegate returns the CabDelegate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCabRecommendation

func (c *ChangeRequest) GetCabRecommendation() string

GetCabRecommendation returns the CabRecommendation field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCabRequired

func (c *ChangeRequest) GetCabRequired() string

GetCabRequired returns the CabRequired field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCalendarDuration

func (c *ChangeRequest) GetCalendarDuration() string

GetCalendarDuration returns the CalendarDuration field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCategory

func (c *ChangeRequest) GetCategory() string

GetCategory returns the Category field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetChangePlan

func (c *ChangeRequest) GetChangePlan() string

GetChangePlan returns the ChangePlan field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetChgModel

func (c *ChangeRequest) GetChgModel() string

GetChgModel returns the ChgModel field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCloseCode

func (c *ChangeRequest) GetCloseCode() string

GetCloseCode returns the CloseCode field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCloseNotes

func (c *ChangeRequest) GetCloseNotes() string

GetCloseNotes returns the CloseNotes field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetClosedAt

func (c *ChangeRequest) GetClosedAt() string

GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetClosedBy

func (c *ChangeRequest) GetClosedBy() string

GetClosedBy returns the ClosedBy field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCmdbCi

func (c *ChangeRequest) GetCmdbCi() string

GetCmdbCi returns the CmdbCi field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetComments

func (c *ChangeRequest) GetComments() string

GetComments returns the Comments field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCommentsAndWorkNotes

func (c *ChangeRequest) GetCommentsAndWorkNotes() string

GetCommentsAndWorkNotes returns the CommentsAndWorkNotes field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCompany

func (c *ChangeRequest) GetCompany() string

GetCompany returns the Company field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetConflictLastRun

func (c *ChangeRequest) GetConflictLastRun() string

GetConflictLastRun returns the ConflictLastRun field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetConflictStatus

func (c *ChangeRequest) GetConflictStatus() string

GetConflictStatus returns the ConflictStatus field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetContactType

func (c *ChangeRequest) GetContactType() string

GetContactType returns the ContactType field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCorrelationDisplay

func (c *ChangeRequest) GetCorrelationDisplay() string

GetCorrelationDisplay returns the CorrelationDisplay field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetCorrelationID

func (c *ChangeRequest) GetCorrelationID() string

GetCorrelationID returns the CorrelationID field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetDescription

func (c *ChangeRequest) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetDueDate

func (c *ChangeRequest) GetDueDate() string

GetDueDate returns the DueDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetEndDate

func (c *ChangeRequest) GetEndDate() string

GetEndDate returns the EndDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetEscalation

func (c *ChangeRequest) GetEscalation() string

GetEscalation returns the Escalation field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetExpectedStart

func (c *ChangeRequest) GetExpectedStart() string

GetExpectedStart returns the ExpectedStart field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetExtra

func (c *ChangeRequest) GetExtra() map[string]string

GetExtra returns the Extra map if it's non-nil, an empty map otherwise.

func (*ChangeRequest) GetFollowUp

func (c *ChangeRequest) GetFollowUp() string

GetFollowUp returns the FollowUp field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetGroupList

func (c *ChangeRequest) GetGroupList() string

GetGroupList returns the GroupList field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetImpact

func (c *ChangeRequest) GetImpact() string

GetImpact returns the Impact field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetImplementationPlan

func (c *ChangeRequest) GetImplementationPlan() string

GetImplementationPlan returns the ImplementationPlan field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetJustification

func (c *ChangeRequest) GetJustification() string

GetJustification returns the Justification field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetKnowledge

func (c *ChangeRequest) GetKnowledge() string

GetKnowledge returns the Knowledge field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetLocation

func (c *ChangeRequest) GetLocation() string

GetLocation returns the Location field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetMadeSLA

func (c *ChangeRequest) GetMadeSLA() string

GetMadeSLA returns the MadeSLA field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetNumber

func (c *ChangeRequest) GetNumber() string

GetNumber returns the Number field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOnHold

func (c *ChangeRequest) GetOnHold() string

GetOnHold returns the OnHold field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOnHoldReason

func (c *ChangeRequest) GetOnHoldReason() string

GetOnHoldReason returns the OnHoldReason field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOnHoldTask

func (c *ChangeRequest) GetOnHoldTask() string

GetOnHoldTask returns the OnHoldTask field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOpenedAt

func (c *ChangeRequest) GetOpenedAt() string

GetOpenedAt returns the OpenedAt field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOpenedBy

func (c *ChangeRequest) GetOpenedBy() string

GetOpenedBy returns the OpenedBy field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOrder

func (c *ChangeRequest) GetOrder() string

GetOrder returns the Order field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetOutsideMaintenanceSchedule

func (c *ChangeRequest) GetOutsideMaintenanceSchedule() string

GetOutsideMaintenanceSchedule returns the OutsideMaintenanceSchedule field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetParent

func (c *ChangeRequest) GetParent() string

GetParent returns the Parent field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetPhase

func (c *ChangeRequest) GetPhase() string

GetPhase returns the Phase field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetPhaseState

func (c *ChangeRequest) GetPhaseState() string

GetPhaseState returns the PhaseState field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetPriority

func (c *ChangeRequest) GetPriority() string

GetPriority returns the Priority field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetProductionSystem

func (c *ChangeRequest) GetProductionSystem() string

GetProductionSystem returns the ProductionSystem field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetReason

func (c *ChangeRequest) GetReason() string

GetReason returns the Reason field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetReassignmentCount

func (c *ChangeRequest) GetReassignmentCount() string

GetReassignmentCount returns the ReassignmentCount field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRequestedBy

func (c *ChangeRequest) GetRequestedBy() string

GetRequestedBy returns the RequestedBy field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRequestedByDate

func (c *ChangeRequest) GetRequestedByDate() string

GetRequestedByDate returns the RequestedByDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetReviewComments

func (c *ChangeRequest) GetReviewComments() string

GetReviewComments returns the ReviewComments field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetReviewDate

func (c *ChangeRequest) GetReviewDate() string

GetReviewDate returns the ReviewDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetReviewStatus

func (c *ChangeRequest) GetReviewStatus() string

GetReviewStatus returns the ReviewStatus field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRisk

func (c *ChangeRequest) GetRisk() string

GetRisk returns the Risk field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRiskImpactAnalysis

func (c *ChangeRequest) GetRiskImpactAnalysis() string

GetRiskImpactAnalysis returns the RiskImpactAnalysis field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRiskValue

func (c *ChangeRequest) GetRiskValue() string

GetRiskValue returns the RiskValue field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetRouteReason

func (c *ChangeRequest) GetRouteReason() string

GetRouteReason returns the RouteReason field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSLADue

func (c *ChangeRequest) GetSLADue() string

GetSLADue returns the SLADue field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetScope

func (c *ChangeRequest) GetScope() string

GetScope returns the Scope field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetServiceOffering

func (c *ChangeRequest) GetServiceOffering() string

GetServiceOffering returns the ServiceOffering field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetShortDescription

func (c *ChangeRequest) GetShortDescription() string

GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSkills

func (c *ChangeRequest) GetSkills() string

GetSkills returns the Skills field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSnEsignDocument

func (c *ChangeRequest) GetSnEsignDocument() string

GetSnEsignDocument returns the SnEsignDocument field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSnEsignEsignatureConfiguration

func (c *ChangeRequest) GetSnEsignEsignatureConfiguration() string

GetSnEsignEsignatureConfiguration returns the SnEsignEsignatureConfiguration field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetStartDate

func (c *ChangeRequest) GetStartDate() string

GetStartDate returns the StartDate field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetState

func (c *ChangeRequest) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetStatus

func (c *ChangeRequest) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetStdChangeProducerVersion

func (c *ChangeRequest) GetStdChangeProducerVersion() string

GetStdChangeProducerVersion returns the StdChangeProducerVersion field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysClassName

func (c *ChangeRequest) GetSysClassName() string

GetSysClassName returns the SysClassName field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysCreatedBy

func (c *ChangeRequest) GetSysCreatedBy() string

GetSysCreatedBy returns the SysCreatedBy field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysCreatedOn

func (c *ChangeRequest) GetSysCreatedOn() string

GetSysCreatedOn returns the SysCreatedOn field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysDomain

func (c *ChangeRequest) GetSysDomain() string

GetSysDomain returns the SysDomain field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysDomainPath

func (c *ChangeRequest) GetSysDomainPath() string

GetSysDomainPath returns the SysDomainPath field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysID

func (c *ChangeRequest) GetSysID() string

GetSysID returns the SysID field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysModCount

func (c *ChangeRequest) GetSysModCount() string

GetSysModCount returns the SysModCount field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysTags

func (c *ChangeRequest) GetSysTags() string

GetSysTags returns the SysTags field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysUpdatedBy

func (c *ChangeRequest) GetSysUpdatedBy() string

GetSysUpdatedBy returns the SysUpdatedBy field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetSysUpdatedOn

func (c *ChangeRequest) GetSysUpdatedOn() string

GetSysUpdatedOn returns the SysUpdatedOn field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetTaskEffectiveNumber

func (c *ChangeRequest) GetTaskEffectiveNumber() string

GetTaskEffectiveNumber returns the TaskEffectiveNumber field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetTestPlan

func (c *ChangeRequest) GetTestPlan() string

GetTestPlan returns the TestPlan field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetTimeWorked

func (c *ChangeRequest) GetTimeWorked() string

GetTimeWorked returns the TimeWorked field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetType

func (c *ChangeRequest) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUnauthorized

func (c *ChangeRequest) GetUnauthorized() string

GetUnauthorized returns the Unauthorized field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUniversalRequest

func (c *ChangeRequest) GetUniversalRequest() string

GetUniversalRequest returns the UniversalRequest field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUponApproval

func (c *ChangeRequest) GetUponApproval() string

GetUponApproval returns the UponApproval field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUponReject

func (c *ChangeRequest) GetUponReject() string

GetUponReject returns the UponReject field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUrgency

func (c *ChangeRequest) GetUrgency() string

GetUrgency returns the Urgency field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetUserInput

func (c *ChangeRequest) GetUserInput() string

GetUserInput returns the UserInput field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetWatchList

func (c *ChangeRequest) GetWatchList() string

GetWatchList returns the WatchList field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetWorkEnd

func (c *ChangeRequest) GetWorkEnd() string

GetWorkEnd returns the WorkEnd field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetWorkNotes

func (c *ChangeRequest) GetWorkNotes() string

GetWorkNotes returns the WorkNotes field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetWorkNotesList

func (c *ChangeRequest) GetWorkNotesList() string

GetWorkNotesList returns the WorkNotesList field if it's non-nil, zero value otherwise.

func (*ChangeRequest) GetWorkStart

func (c *ChangeRequest) GetWorkStart() string

GetWorkStart returns the WorkStart field if it's non-nil, zero value otherwise.

func (ChangeRequest) MarshalJSON

func (c ChangeRequest) MarshalJSON() ([]byte, error)

func (ChangeRequest) String

func (c ChangeRequest) String() string

type ChangeRequestsService

type ChangeRequestsService service

ChangeRequestsService handles the communication with the ChangeRequest related methods of the ServiceNow API.

func (*ChangeRequestsService) Create

Create a new change request on the specified CMDB CI.

func (*ChangeRequestsService) Get

Get a single Change Request.

func (*ChangeRequestsService) List

List change requests

func (*ChangeRequestsService) Update

Update an existing change request on the specified CMDB CI.

type Client

type Client struct {

	// Base URL for API requests. BaseURL should always be specified with a trailing slash.
	BaseURL *url.URL

	// User agent used when communicating with the ServiceNow API.
	UserAgent string

	// Services used for talking to different parts of the ServiceNow API.
	Incidents               *IncidentsService
	ChangeRequests          *ChangeRequestsService
	StandardChangeTemplates *StandardChangeTemplatesService
	// contains filtered or unexported fields
}

A Client manages communication with the ServiceNow API.

func NewClient

func NewClient(baseURL string, httpClient *http.Client) (*Client, error)

NewClient returns a new ServiceNow API client. If a nil httpClient is provided, a new http.Client will be used. To use API methods which require authentication, provide a http.Client that will perform the authentication for you (such as that provided by the golang.org/x/oauth2 library).

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.

type CreateOptions

type CreateOptions struct {
	DisplayValue DisplayValueType `url:"displayvalue,omitempty"`
	// contains filtered or unexported fields
}

type DisplayValueType

type DisplayValueType string
const (
	DisplayValueTrue  DisplayValueType = "true"
	DisplayValueFalse DisplayValueType = "false"
	DisplayValueAll   DisplayValueType = "all"
)

type GetOptions

type GetOptions struct {
	DisplayValue DisplayValueType `url:"displayvalue,omitempty"`
	// contains filtered or unexported fields
}

type Incident

type Incident struct {
	Status                 *string `json:"__status,omitempty"`
	Active                 *string `json:"active,omitempty"`
	ActivityDue            *string `json:"activity_due,omitempty"`
	AdditionalAssigneeList *string `json:"additional_assignee_list,omitempty"`
	Approval               *string `json:"approval,omitempty"`
	ApprovalHistory        *string `json:"approval_history,omitempty"`
	ApprovalSet            *string `json:"approval_set,omitempty"`
	AssignedTo             *string `json:"assigned_to,omitempty"`
	AssignmentGroup        *string `json:"assignment_group,omitempty"`
	BusinessDuration       *string `json:"business_duration,omitempty"`
	BusinessService        *string `json:"business_service,omitempty"`
	BusinessStc            *string `json:"business_stc,omitempty"`
	CalendarDuration       *string `json:"calendar_duration,omitempty"`
	CalendarStc            *string `json:"calendar_stc,omitempty"`
	CallerID               *string `json:"caller_id,omitempty"`
	Category               *string `json:"category,omitempty"`
	CausedBy               *string `json:"caused_by,omitempty"`
	ChildIncidents         *string `json:"child_incidents,omitempty"`
	CloseCode              *string `json:"close_code,omitempty"`
	ClosedAt               *string `json:"closed_at,omitempty"`
	ClosedBy               *string `json:"closed_by,omitempty"`
	CloseNotes             *string `json:"close_notes,omitempty"`
	CmdbCi                 *string `json:"cmdb_ci,omitempty"`
	Comments               *string `json:"comments,omitempty"`
	CommentsAndWorkNotes   *string `json:"comments_and_work_notes,omitempty"`
	Company                *string `json:"company,omitempty"`
	ContactType            *string `json:"contact_type,omitempty"`
	CorrelationDisplay     *string `json:"correlation_display,omitempty"`
	CorrelationID          *string `json:"correlation_id,omitempty"`
	DeliveryPlan           *string `json:"delivery_plan,omitempty"`
	DeliveryTask           *string `json:"delivery_task,omitempty"`
	Description            *string `json:"description,omitempty"`
	DueDate                *string `json:"due_date,omitempty"`
	Escalation             *string `json:"escalation,omitempty"`
	ExpectedStart          *string `json:"expected_start,omitempty"`
	FollowUp               *string `json:"follow_up,omitempty"`
	GroupList              *string `json:"group_list,omitempty"`
	Impact                 *string `json:"impact,omitempty"`
	IncidentState          *string `json:"incident_state,omitempty"`
	Knowledge              *string `json:"knowledge,omitempty"`
	Location               *string `json:"location,omitempty"`
	MadeSLA                *string `json:"made_sla,omitempty"`
	Notify                 *string `json:"notify,omitempty"`
	Number                 *string `json:"number,omitempty"`
	OpenedAt               *string `json:"opened_at,omitempty"`
	OpenedBy               *string `json:"opened_by,omitempty"`
	Order                  *string `json:"order,omitempty"`
	Parent                 *string `json:"parent,omitempty"`
	ParentIncident         *string `json:"parent_incident,omitempty"`
	Priority               *string `json:"priority,omitempty"`
	ProblemID              *string `json:"problem_id,omitempty"`
	ReassignmentCount      *string `json:"reassignment_count,omitempty"`
	RejectionGoto          *string `json:"rejection_goto,omitempty"`
	ReopenCount            *string `json:"reopen_count,omitempty"`
	ResolvedAt             *string `json:"resolved_at,omitempty"`
	ResolvedBy             *string `json:"resolved_by,omitempty"`
	Rfc                    *string `json:"rfc,omitempty"`
	Severity               *string `json:"severity,omitempty"`
	ShortDescription       *string `json:"short_description,omitempty"`
	SLADue                 *string `json:"sla_due,omitempty"`
	State                  *string `json:"state,omitempty"`
	Subcategory            *string `json:"subcategory,omitempty"`
	SysClassName           *string `json:"sys_class_name,omitempty"`
	SysCreatedBy           *string `json:"sys_created_by,omitempty"`
	SysCreatedOn           *string `json:"sys_created_on,omitempty"`
	SysDomain              *string `json:"sys_domain,omitempty"`
	SysDomainPath          *string `json:"sys_domain_path,omitempty"`
	SysID                  *string `json:"sys_id,omitempty"`
	SysModCount            *string `json:"sys_mod_count,omitempty"`
	SysTags                *string `json:"sys_tags,omitempty"`
	SysUpdatedBy           *string `json:"sys_updated_by,omitempty"`
	SysUpdatedOn           *string `json:"sys_updated_on,omitempty"`
	TimeWorked             *string `json:"time_worked,omitempty"`
	UponApproval           *string `json:"upon_approval,omitempty"`
	UponReject             *string `json:"upon_reject,omitempty"`
	Urgency                *string `json:"urgency,omitempty"`
	UserInput              *string `json:"user_input,omitempty"`
	WatchList              *string `json:"watch_list,omitempty"`
	WfActivity             *string `json:"wf_activity,omitempty"`
	WorkEnd                *string `json:"work_end,omitempty"`
	WorkNotes              *string `json:"work_notes,omitempty"`
	WorkNotesList          *string `json:"work_notes_list,omitempty"`
	WorkStart              *string `json:"work_start,omitempty"`

	Extra map[string]string `json:"-"`
}

Incident represents a ServiceNow incident.

func (*Incident) GetActive

func (i *Incident) GetActive() string

GetActive returns the Active field if it's non-nil, zero value otherwise.

func (*Incident) GetActivityDue

func (i *Incident) GetActivityDue() string

GetActivityDue returns the ActivityDue field if it's non-nil, zero value otherwise.

func (*Incident) GetAdditionalAssigneeList

func (i *Incident) GetAdditionalAssigneeList() string

GetAdditionalAssigneeList returns the AdditionalAssigneeList field if it's non-nil, zero value otherwise.

func (*Incident) GetApproval

func (i *Incident) GetApproval() string

GetApproval returns the Approval field if it's non-nil, zero value otherwise.

func (*Incident) GetApprovalHistory

func (i *Incident) GetApprovalHistory() string

GetApprovalHistory returns the ApprovalHistory field if it's non-nil, zero value otherwise.

func (*Incident) GetApprovalSet

func (i *Incident) GetApprovalSet() string

GetApprovalSet returns the ApprovalSet field if it's non-nil, zero value otherwise.

func (*Incident) GetAssignedTo

func (i *Incident) GetAssignedTo() string

GetAssignedTo returns the AssignedTo field if it's non-nil, zero value otherwise.

func (*Incident) GetAssignmentGroup

func (i *Incident) GetAssignmentGroup() string

GetAssignmentGroup returns the AssignmentGroup field if it's non-nil, zero value otherwise.

func (*Incident) GetBusinessDuration

func (i *Incident) GetBusinessDuration() string

GetBusinessDuration returns the BusinessDuration field if it's non-nil, zero value otherwise.

func (*Incident) GetBusinessService

func (i *Incident) GetBusinessService() string

GetBusinessService returns the BusinessService field if it's non-nil, zero value otherwise.

func (*Incident) GetBusinessStc

func (i *Incident) GetBusinessStc() string

GetBusinessStc returns the BusinessStc field if it's non-nil, zero value otherwise.

func (*Incident) GetCalendarDuration

func (i *Incident) GetCalendarDuration() string

GetCalendarDuration returns the CalendarDuration field if it's non-nil, zero value otherwise.

func (*Incident) GetCalendarStc

func (i *Incident) GetCalendarStc() string

GetCalendarStc returns the CalendarStc field if it's non-nil, zero value otherwise.

func (*Incident) GetCallerID

func (i *Incident) GetCallerID() string

GetCallerID returns the CallerID field if it's non-nil, zero value otherwise.

func (*Incident) GetCategory

func (i *Incident) GetCategory() string

GetCategory returns the Category field if it's non-nil, zero value otherwise.

func (*Incident) GetCausedBy

func (i *Incident) GetCausedBy() string

GetCausedBy returns the CausedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetChildIncidents

func (i *Incident) GetChildIncidents() string

GetChildIncidents returns the ChildIncidents field if it's non-nil, zero value otherwise.

func (*Incident) GetCloseCode

func (i *Incident) GetCloseCode() string

GetCloseCode returns the CloseCode field if it's non-nil, zero value otherwise.

func (*Incident) GetCloseNotes

func (i *Incident) GetCloseNotes() string

GetCloseNotes returns the CloseNotes field if it's non-nil, zero value otherwise.

func (*Incident) GetClosedAt

func (i *Incident) GetClosedAt() string

GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.

func (*Incident) GetClosedBy

func (i *Incident) GetClosedBy() string

GetClosedBy returns the ClosedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetCmdbCi

func (i *Incident) GetCmdbCi() string

GetCmdbCi returns the CmdbCi field if it's non-nil, zero value otherwise.

func (*Incident) GetComments

func (i *Incident) GetComments() string

GetComments returns the Comments field if it's non-nil, zero value otherwise.

func (*Incident) GetCommentsAndWorkNotes

func (i *Incident) GetCommentsAndWorkNotes() string

GetCommentsAndWorkNotes returns the CommentsAndWorkNotes field if it's non-nil, zero value otherwise.

func (*Incident) GetCompany

func (i *Incident) GetCompany() string

GetCompany returns the Company field if it's non-nil, zero value otherwise.

func (*Incident) GetContactType

func (i *Incident) GetContactType() string

GetContactType returns the ContactType field if it's non-nil, zero value otherwise.

func (*Incident) GetCorrelationDisplay

func (i *Incident) GetCorrelationDisplay() string

GetCorrelationDisplay returns the CorrelationDisplay field if it's non-nil, zero value otherwise.

func (*Incident) GetCorrelationID

func (i *Incident) GetCorrelationID() string

GetCorrelationID returns the CorrelationID field if it's non-nil, zero value otherwise.

func (*Incident) GetDeliveryPlan

func (i *Incident) GetDeliveryPlan() string

GetDeliveryPlan returns the DeliveryPlan field if it's non-nil, zero value otherwise.

func (*Incident) GetDeliveryTask

func (i *Incident) GetDeliveryTask() string

GetDeliveryTask returns the DeliveryTask field if it's non-nil, zero value otherwise.

func (*Incident) GetDescription

func (i *Incident) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Incident) GetDueDate

func (i *Incident) GetDueDate() string

GetDueDate returns the DueDate field if it's non-nil, zero value otherwise.

func (*Incident) GetEscalation

func (i *Incident) GetEscalation() string

GetEscalation returns the Escalation field if it's non-nil, zero value otherwise.

func (*Incident) GetExpectedStart

func (i *Incident) GetExpectedStart() string

GetExpectedStart returns the ExpectedStart field if it's non-nil, zero value otherwise.

func (*Incident) GetExtra

func (i *Incident) GetExtra() map[string]string

GetExtra returns the Extra map if it's non-nil, an empty map otherwise.

func (*Incident) GetFollowUp

func (i *Incident) GetFollowUp() string

GetFollowUp returns the FollowUp field if it's non-nil, zero value otherwise.

func (*Incident) GetGroupList

func (i *Incident) GetGroupList() string

GetGroupList returns the GroupList field if it's non-nil, zero value otherwise.

func (*Incident) GetImpact

func (i *Incident) GetImpact() string

GetImpact returns the Impact field if it's non-nil, zero value otherwise.

func (*Incident) GetIncidentState

func (i *Incident) GetIncidentState() string

GetIncidentState returns the IncidentState field if it's non-nil, zero value otherwise.

func (*Incident) GetKnowledge

func (i *Incident) GetKnowledge() string

GetKnowledge returns the Knowledge field if it's non-nil, zero value otherwise.

func (*Incident) GetLocation

func (i *Incident) GetLocation() string

GetLocation returns the Location field if it's non-nil, zero value otherwise.

func (*Incident) GetMadeSLA

func (i *Incident) GetMadeSLA() string

GetMadeSLA returns the MadeSLA field if it's non-nil, zero value otherwise.

func (*Incident) GetNotify

func (i *Incident) GetNotify() string

GetNotify returns the Notify field if it's non-nil, zero value otherwise.

func (*Incident) GetNumber

func (i *Incident) GetNumber() string

GetNumber returns the Number field if it's non-nil, zero value otherwise.

func (*Incident) GetOpenedAt

func (i *Incident) GetOpenedAt() string

GetOpenedAt returns the OpenedAt field if it's non-nil, zero value otherwise.

func (*Incident) GetOpenedBy

func (i *Incident) GetOpenedBy() string

GetOpenedBy returns the OpenedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetOrder

func (i *Incident) GetOrder() string

GetOrder returns the Order field if it's non-nil, zero value otherwise.

func (*Incident) GetParent

func (i *Incident) GetParent() string

GetParent returns the Parent field if it's non-nil, zero value otherwise.

func (*Incident) GetParentIncident

func (i *Incident) GetParentIncident() string

GetParentIncident returns the ParentIncident field if it's non-nil, zero value otherwise.

func (*Incident) GetPriority

func (i *Incident) GetPriority() string

GetPriority returns the Priority field if it's non-nil, zero value otherwise.

func (*Incident) GetProblemID

func (i *Incident) GetProblemID() string

GetProblemID returns the ProblemID field if it's non-nil, zero value otherwise.

func (*Incident) GetReassignmentCount

func (i *Incident) GetReassignmentCount() string

GetReassignmentCount returns the ReassignmentCount field if it's non-nil, zero value otherwise.

func (*Incident) GetRejectionGoto

func (i *Incident) GetRejectionGoto() string

GetRejectionGoto returns the RejectionGoto field if it's non-nil, zero value otherwise.

func (*Incident) GetReopenCount

func (i *Incident) GetReopenCount() string

GetReopenCount returns the ReopenCount field if it's non-nil, zero value otherwise.

func (*Incident) GetResolvedAt

func (i *Incident) GetResolvedAt() string

GetResolvedAt returns the ResolvedAt field if it's non-nil, zero value otherwise.

func (*Incident) GetResolvedBy

func (i *Incident) GetResolvedBy() string

GetResolvedBy returns the ResolvedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetRfc

func (i *Incident) GetRfc() string

GetRfc returns the Rfc field if it's non-nil, zero value otherwise.

func (*Incident) GetSLADue

func (i *Incident) GetSLADue() string

GetSLADue returns the SLADue field if it's non-nil, zero value otherwise.

func (*Incident) GetSeverity

func (i *Incident) GetSeverity() string

GetSeverity returns the Severity field if it's non-nil, zero value otherwise.

func (*Incident) GetShortDescription

func (i *Incident) GetShortDescription() string

GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise.

func (*Incident) GetState

func (i *Incident) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*Incident) GetStatus

func (i *Incident) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*Incident) GetSubcategory

func (i *Incident) GetSubcategory() string

GetSubcategory returns the Subcategory field if it's non-nil, zero value otherwise.

func (*Incident) GetSysClassName

func (i *Incident) GetSysClassName() string

GetSysClassName returns the SysClassName field if it's non-nil, zero value otherwise.

func (*Incident) GetSysCreatedBy

func (i *Incident) GetSysCreatedBy() string

GetSysCreatedBy returns the SysCreatedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetSysCreatedOn

func (i *Incident) GetSysCreatedOn() string

GetSysCreatedOn returns the SysCreatedOn field if it's non-nil, zero value otherwise.

func (*Incident) GetSysDomain

func (i *Incident) GetSysDomain() string

GetSysDomain returns the SysDomain field if it's non-nil, zero value otherwise.

func (*Incident) GetSysDomainPath

func (i *Incident) GetSysDomainPath() string

GetSysDomainPath returns the SysDomainPath field if it's non-nil, zero value otherwise.

func (*Incident) GetSysID

func (i *Incident) GetSysID() string

GetSysID returns the SysID field if it's non-nil, zero value otherwise.

func (*Incident) GetSysModCount

func (i *Incident) GetSysModCount() string

GetSysModCount returns the SysModCount field if it's non-nil, zero value otherwise.

func (*Incident) GetSysTags

func (i *Incident) GetSysTags() string

GetSysTags returns the SysTags field if it's non-nil, zero value otherwise.

func (*Incident) GetSysUpdatedBy

func (i *Incident) GetSysUpdatedBy() string

GetSysUpdatedBy returns the SysUpdatedBy field if it's non-nil, zero value otherwise.

func (*Incident) GetSysUpdatedOn

func (i *Incident) GetSysUpdatedOn() string

GetSysUpdatedOn returns the SysUpdatedOn field if it's non-nil, zero value otherwise.

func (*Incident) GetTimeWorked

func (i *Incident) GetTimeWorked() string

GetTimeWorked returns the TimeWorked field if it's non-nil, zero value otherwise.

func (*Incident) GetUponApproval

func (i *Incident) GetUponApproval() string

GetUponApproval returns the UponApproval field if it's non-nil, zero value otherwise.

func (*Incident) GetUponReject

func (i *Incident) GetUponReject() string

GetUponReject returns the UponReject field if it's non-nil, zero value otherwise.

func (*Incident) GetUrgency

func (i *Incident) GetUrgency() string

GetUrgency returns the Urgency field if it's non-nil, zero value otherwise.

func (*Incident) GetUserInput

func (i *Incident) GetUserInput() string

GetUserInput returns the UserInput field if it's non-nil, zero value otherwise.

func (*Incident) GetWatchList

func (i *Incident) GetWatchList() string

GetWatchList returns the WatchList field if it's non-nil, zero value otherwise.

func (*Incident) GetWfActivity

func (i *Incident) GetWfActivity() string

GetWfActivity returns the WfActivity field if it's non-nil, zero value otherwise.

func (*Incident) GetWorkEnd

func (i *Incident) GetWorkEnd() string

GetWorkEnd returns the WorkEnd field if it's non-nil, zero value otherwise.

func (*Incident) GetWorkNotes

func (i *Incident) GetWorkNotes() string

GetWorkNotes returns the WorkNotes field if it's non-nil, zero value otherwise.

func (*Incident) GetWorkNotesList

func (i *Incident) GetWorkNotesList() string

GetWorkNotesList returns the WorkNotesList field if it's non-nil, zero value otherwise.

func (*Incident) GetWorkStart

func (i *Incident) GetWorkStart() string

GetWorkStart returns the WorkStart field if it's non-nil, zero value otherwise.

func (Incident) MarshalJSON

func (i Incident) MarshalJSON() ([]byte, error)

func (Incident) String

func (i Incident) String() string

type IncidentsService

type IncidentsService service

IncidentsService handles communication with the Incident related methods of the ServiceNow API.

func (*IncidentsService) Create

func (s *IncidentsService) Create(ctx context.Context, inc *Incident, opts CreateOptions) (*Incident, *Response, error)

Create a new incident on the specified CMDB CI.

func (*IncidentsService) Get

func (s *IncidentsService) Get(ctx context.Context, number string, opts GetOptions) (*Incident, *Response, error)

Get a single incident.

func (*IncidentsService) List

func (s *IncidentsService) List(ctx context.Context, opts ListOptions) ([]*Incident, *Response, error)

List incidents.

func (*IncidentsService) Update

func (s *IncidentsService) Update(ctx context.Context, number string, inc *Incident, opts UpdateOptions) (*Incident, *Response, error)

Update an existing incident on the specified CMDB CI.

type ListOptions

type ListOptions struct {
	Limit        string           `url:"sysparm_record_count,omitempty"`
	DisplayValue DisplayValueType `url:"displayvalue,omitempty"`

	QueryOpts []QueryOpts `url:"-"`
	// contains filtered or unexported fields
}

type OperandType

type OperandType string
const (
	Eq         OperandType = "="
	Ne         OperandType = "!="
	AND        OperandType = "^"
	LOR        OperandType = "^OR"
	LIKE       OperandType = "LIKE"
	STARTSWITH OperandType = "STARTSWITH"
	ENDSWITH   OperandType = "ENDSWITH"
)

type QueryOpts

type QueryOpts struct {
	Key string
	Op  OperandType
	Val string
}

type Response

type Response struct {
	*http.Response
}

Response is a ServiceNow API response. This wraps the standard http.Response returned from ServiceNow and provides convenient access to things like pagination links.

type StandardChangeTemplate

type StandardChangeTemplate struct {
	Status                         *string `json:"__status,omitempty"`
	Active                         *string `json:"active,omitempty"`
	ActivityDue                    *string `json:"activity_due,omitempty"`
	AdditionalAssigneeList         *string `json:"additional_assignee_list,omitempty"`
	Approval                       *string `json:"approval,omitempty"`
	ApprovalHistory                *string `json:"approval_history,omitempty"`
	ApprovalSet                    *string `json:"approval_set,omitempty"`
	AssignedTo                     *string `json:"assigned_to,omitempty"`
	AssignmentGroup                *string `json:"assignment_group,omitempty"`
	BusinessDuration               *string `json:"business_duration,omitempty"`
	BusinessJustification          *string `json:"business_justification,omitempty"`
	BusinessService                *string `json:"business_service,omitempty"`
	CalendarDuration               *string `json:"calendar_duration,omitempty"`
	Catalog                        *string `json:"catalog,omitempty"`
	Category                       *string `json:"category,omitempty"`
	ChangeRequests                 *string `json:"change_requests,omitempty"`
	ClosedAt                       *string `json:"closed_at,omitempty"`
	ClosedBy                       *string `json:"closed_by,omitempty"`
	CloseNotes                     *string `json:"close_notes,omitempty"`
	CmdbCi                         *string `json:"cmdb_ci,omitempty"`
	Comments                       *string `json:"comments,omitempty"`
	CommentsAndWorkNotes           *string `json:"comments_and_work_notes,omitempty"`
	Company                        *string `json:"company,omitempty"`
	ContactType                    *string `json:"contact_type,omitempty"`
	CorrelationDisplay             *string `json:"correlation_display,omitempty"`
	CorrelationID                  *string `json:"correlation_id,omitempty"`
	CreatedFromChange              *string `json:"created_from_change,omitempty"`
	Description                    *string `json:"description,omitempty"`
	DueDate                        *string `json:"due_date,omitempty"`
	Escalation                     *string `json:"escalation,omitempty"`
	ExpectedStart                  *string `json:"expected_start,omitempty"`
	FollowUp                       *string `json:"follow_up,omitempty"`
	GroupList                      *string `json:"group_list,omitempty"`
	Impact                         *string `json:"impact,omitempty"`
	Knowledge                      *string `json:"knowledge,omitempty"`
	Location                       *string `json:"location,omitempty"`
	MadeSLA                        *string `json:"made_sla,omitempty"`
	Number                         *string `json:"number,omitempty"`
	OpenedAt                       *string `json:"opened_at,omitempty"`
	OpenedBy                       *string `json:"opened_by,omitempty"`
	Order                          *string `json:"order,omitempty"`
	Parent                         *string `json:"parent,omitempty"`
	Priority                       *string `json:"priority,omitempty"`
	ProposalType                   *string `json:"proposal_type,omitempty"`
	ReassignmentCount              *string `json:"reassignment_count,omitempty"`
	RouteReason                    *string `json:"route_reason,omitempty"`
	ServiceOffering                *string `json:"service_offering,omitempty"`
	ShortDescription               *string `json:"short_description,omitempty"`
	Skills                         *string `json:"skills,omitempty"`
	SLADue                         *string `json:"sla_due,omitempty"`
	SnEsignDocument                *string `json:"sn_esign_document,omitempty"`
	SnEsignEsignatureConfiguration *string `json:"sn_esign_esignature_configuration,omitempty"`
	State                          *string `json:"state,omitempty"`
	StdChangeProducer              *string `json:"std_change_producer,omitempty"`
	StdChangeProducerVersion       *string `json:"std_change_producer_version,omitempty"`
	SysClassName                   *string `json:"sys_class_name,omitempty"`
	SysCreatedBy                   *string `json:"sys_created_by,omitempty"`
	SysCreatedOn                   *string `json:"sys_created_on,omitempty"`
	SysDomain                      *string `json:"sys_domain,omitempty"`
	SysDomainPath                  *string `json:"sys_domain_path,omitempty"`
	SysID                          *string `json:"sys_id,omitempty"`
	SysModCount                    *string `json:"sys_mod_count,omitempty"`
	SysTags                        *string `json:"sys_tags,omitempty"`
	SysUpdatedBy                   *string `json:"sys_updated_by,omitempty"`
	SysUpdatedOn                   *string `json:"sys_updated_on,omitempty"`
	TaskEffectiveNumber            *string `json:"task_effective_number,omitempty"`
	TemplateName                   *string `json:"template_name,omitempty"`
	TemplateValue                  *string `json:"template_value,omitempty"`
	TimeWorked                     *string `json:"time_worked,omitempty"`
	UniversalRequest               *string `json:"universal_request,omitempty"`
	UponApproval                   *string `json:"upon_approval,omitempty"`
	UponReject                     *string `json:"upon_reject,omitempty"`
	Urgency                        *string `json:"urgency,omitempty"`
	UserInput                      *string `json:"user_input,omitempty"`
	WatchList                      *string `json:"watch_list,omitempty"`
	WorkEnd                        *string `json:"work_end,omitempty"`
	WorkNotes                      *string `json:"work_notes,omitempty"`
	WorkNotesList                  *string `json:"work_notes_list,omitempty"`
	WorkStart                      *string `json:"work_start,omitempty"`

	Extra map[string]string `json:"-"`
}

StandardChangeTemplate represents a Standard Change Template

func (*StandardChangeTemplate) GetActive

func (s *StandardChangeTemplate) GetActive() string

GetActive returns the Active field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetActivityDue

func (s *StandardChangeTemplate) GetActivityDue() string

GetActivityDue returns the ActivityDue field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetAdditionalAssigneeList

func (s *StandardChangeTemplate) GetAdditionalAssigneeList() string

GetAdditionalAssigneeList returns the AdditionalAssigneeList field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetApproval

func (s *StandardChangeTemplate) GetApproval() string

GetApproval returns the Approval field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetApprovalHistory

func (s *StandardChangeTemplate) GetApprovalHistory() string

GetApprovalHistory returns the ApprovalHistory field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetApprovalSet

func (s *StandardChangeTemplate) GetApprovalSet() string

GetApprovalSet returns the ApprovalSet field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetAssignedTo

func (s *StandardChangeTemplate) GetAssignedTo() string

GetAssignedTo returns the AssignedTo field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetAssignmentGroup

func (s *StandardChangeTemplate) GetAssignmentGroup() string

GetAssignmentGroup returns the AssignmentGroup field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetBusinessDuration

func (s *StandardChangeTemplate) GetBusinessDuration() string

GetBusinessDuration returns the BusinessDuration field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetBusinessJustification

func (s *StandardChangeTemplate) GetBusinessJustification() string

GetBusinessJustification returns the BusinessJustification field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetBusinessService

func (s *StandardChangeTemplate) GetBusinessService() string

GetBusinessService returns the BusinessService field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCalendarDuration

func (s *StandardChangeTemplate) GetCalendarDuration() string

GetCalendarDuration returns the CalendarDuration field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCatalog

func (s *StandardChangeTemplate) GetCatalog() string

GetCatalog returns the Catalog field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCategory

func (s *StandardChangeTemplate) GetCategory() string

GetCategory returns the Category field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetChangeRequests

func (s *StandardChangeTemplate) GetChangeRequests() string

GetChangeRequests returns the ChangeRequests field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCloseNotes

func (s *StandardChangeTemplate) GetCloseNotes() string

GetCloseNotes returns the CloseNotes field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetClosedAt

func (s *StandardChangeTemplate) GetClosedAt() string

GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetClosedBy

func (s *StandardChangeTemplate) GetClosedBy() string

GetClosedBy returns the ClosedBy field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCmdbCi

func (s *StandardChangeTemplate) GetCmdbCi() string

GetCmdbCi returns the CmdbCi field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetComments

func (s *StandardChangeTemplate) GetComments() string

GetComments returns the Comments field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCommentsAndWorkNotes

func (s *StandardChangeTemplate) GetCommentsAndWorkNotes() string

GetCommentsAndWorkNotes returns the CommentsAndWorkNotes field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCompany

func (s *StandardChangeTemplate) GetCompany() string

GetCompany returns the Company field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetContactType

func (s *StandardChangeTemplate) GetContactType() string

GetContactType returns the ContactType field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCorrelationDisplay

func (s *StandardChangeTemplate) GetCorrelationDisplay() string

GetCorrelationDisplay returns the CorrelationDisplay field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCorrelationID

func (s *StandardChangeTemplate) GetCorrelationID() string

GetCorrelationID returns the CorrelationID field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetCreatedFromChange

func (s *StandardChangeTemplate) GetCreatedFromChange() string

GetCreatedFromChange returns the CreatedFromChange field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetDescription

func (s *StandardChangeTemplate) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetDueDate

func (s *StandardChangeTemplate) GetDueDate() string

GetDueDate returns the DueDate field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetEscalation

func (s *StandardChangeTemplate) GetEscalation() string

GetEscalation returns the Escalation field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetExpectedStart

func (s *StandardChangeTemplate) GetExpectedStart() string

GetExpectedStart returns the ExpectedStart field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetExtra

func (s *StandardChangeTemplate) GetExtra() map[string]string

GetExtra returns the Extra map if it's non-nil, an empty map otherwise.

func (*StandardChangeTemplate) GetFollowUp

func (s *StandardChangeTemplate) GetFollowUp() string

GetFollowUp returns the FollowUp field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetGroupList

func (s *StandardChangeTemplate) GetGroupList() string

GetGroupList returns the GroupList field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetImpact

func (s *StandardChangeTemplate) GetImpact() string

GetImpact returns the Impact field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetKnowledge

func (s *StandardChangeTemplate) GetKnowledge() string

GetKnowledge returns the Knowledge field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetLocation

func (s *StandardChangeTemplate) GetLocation() string

GetLocation returns the Location field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetMadeSLA

func (s *StandardChangeTemplate) GetMadeSLA() string

GetMadeSLA returns the MadeSLA field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetNumber

func (s *StandardChangeTemplate) GetNumber() string

GetNumber returns the Number field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetOpenedAt

func (s *StandardChangeTemplate) GetOpenedAt() string

GetOpenedAt returns the OpenedAt field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetOpenedBy

func (s *StandardChangeTemplate) GetOpenedBy() string

GetOpenedBy returns the OpenedBy field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetOrder

func (s *StandardChangeTemplate) GetOrder() string

GetOrder returns the Order field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetParent

func (s *StandardChangeTemplate) GetParent() string

GetParent returns the Parent field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetPriority

func (s *StandardChangeTemplate) GetPriority() string

GetPriority returns the Priority field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetProposalType

func (s *StandardChangeTemplate) GetProposalType() string

GetProposalType returns the ProposalType field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetReassignmentCount

func (s *StandardChangeTemplate) GetReassignmentCount() string

GetReassignmentCount returns the ReassignmentCount field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetRouteReason

func (s *StandardChangeTemplate) GetRouteReason() string

GetRouteReason returns the RouteReason field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSLADue

func (s *StandardChangeTemplate) GetSLADue() string

GetSLADue returns the SLADue field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetServiceOffering

func (s *StandardChangeTemplate) GetServiceOffering() string

GetServiceOffering returns the ServiceOffering field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetShortDescription

func (s *StandardChangeTemplate) GetShortDescription() string

GetShortDescription returns the ShortDescription field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSkills

func (s *StandardChangeTemplate) GetSkills() string

GetSkills returns the Skills field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSnEsignDocument

func (s *StandardChangeTemplate) GetSnEsignDocument() string

GetSnEsignDocument returns the SnEsignDocument field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSnEsignEsignatureConfiguration

func (s *StandardChangeTemplate) GetSnEsignEsignatureConfiguration() string

GetSnEsignEsignatureConfiguration returns the SnEsignEsignatureConfiguration field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetState

func (s *StandardChangeTemplate) GetState() string

GetState returns the State field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetStatus

func (s *StandardChangeTemplate) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetStdChangeProducer

func (s *StandardChangeTemplate) GetStdChangeProducer() string

GetStdChangeProducer returns the StdChangeProducer field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetStdChangeProducerVersion

func (s *StandardChangeTemplate) GetStdChangeProducerVersion() string

GetStdChangeProducerVersion returns the StdChangeProducerVersion field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysClassName

func (s *StandardChangeTemplate) GetSysClassName() string

GetSysClassName returns the SysClassName field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysCreatedBy

func (s *StandardChangeTemplate) GetSysCreatedBy() string

GetSysCreatedBy returns the SysCreatedBy field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysCreatedOn

func (s *StandardChangeTemplate) GetSysCreatedOn() string

GetSysCreatedOn returns the SysCreatedOn field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysDomain

func (s *StandardChangeTemplate) GetSysDomain() string

GetSysDomain returns the SysDomain field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysDomainPath

func (s *StandardChangeTemplate) GetSysDomainPath() string

GetSysDomainPath returns the SysDomainPath field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysID

func (s *StandardChangeTemplate) GetSysID() string

GetSysID returns the SysID field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysModCount

func (s *StandardChangeTemplate) GetSysModCount() string

GetSysModCount returns the SysModCount field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysTags

func (s *StandardChangeTemplate) GetSysTags() string

GetSysTags returns the SysTags field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysUpdatedBy

func (s *StandardChangeTemplate) GetSysUpdatedBy() string

GetSysUpdatedBy returns the SysUpdatedBy field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetSysUpdatedOn

func (s *StandardChangeTemplate) GetSysUpdatedOn() string

GetSysUpdatedOn returns the SysUpdatedOn field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetTaskEffectiveNumber

func (s *StandardChangeTemplate) GetTaskEffectiveNumber() string

GetTaskEffectiveNumber returns the TaskEffectiveNumber field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetTemplateName

func (s *StandardChangeTemplate) GetTemplateName() string

GetTemplateName returns the TemplateName field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetTemplateValue

func (s *StandardChangeTemplate) GetTemplateValue() string

GetTemplateValue returns the TemplateValue field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetTimeWorked

func (s *StandardChangeTemplate) GetTimeWorked() string

GetTimeWorked returns the TimeWorked field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetUniversalRequest

func (s *StandardChangeTemplate) GetUniversalRequest() string

GetUniversalRequest returns the UniversalRequest field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetUponApproval

func (s *StandardChangeTemplate) GetUponApproval() string

GetUponApproval returns the UponApproval field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetUponReject

func (s *StandardChangeTemplate) GetUponReject() string

GetUponReject returns the UponReject field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetUrgency

func (s *StandardChangeTemplate) GetUrgency() string

GetUrgency returns the Urgency field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetUserInput

func (s *StandardChangeTemplate) GetUserInput() string

GetUserInput returns the UserInput field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetWatchList

func (s *StandardChangeTemplate) GetWatchList() string

GetWatchList returns the WatchList field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetWorkEnd

func (s *StandardChangeTemplate) GetWorkEnd() string

GetWorkEnd returns the WorkEnd field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetWorkNotes

func (s *StandardChangeTemplate) GetWorkNotes() string

GetWorkNotes returns the WorkNotes field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetWorkNotesList

func (s *StandardChangeTemplate) GetWorkNotesList() string

GetWorkNotesList returns the WorkNotesList field if it's non-nil, zero value otherwise.

func (*StandardChangeTemplate) GetWorkStart

func (s *StandardChangeTemplate) GetWorkStart() string

GetWorkStart returns the WorkStart field if it's non-nil, zero value otherwise.

func (StandardChangeTemplate) MarshalJSON

func (s StandardChangeTemplate) MarshalJSON() ([]byte, error)

func (StandardChangeTemplate) String

func (s StandardChangeTemplate) String() string

type StandardChangeTemplatesService

type StandardChangeTemplatesService service

StandardChangeTemplatesService handles the communication with the StandardChangeTemplate related methods of the ServiceNow API

func (*StandardChangeTemplatesService) Create

Create a standard change template

func (*StandardChangeTemplatesService) Get

Get a single standard change template

func (*StandardChangeTemplatesService) List

List standard change templates

func (*StandardChangeTemplatesService) Update

Update an existing standard change template on the specified CMDB CI.

type SysparmActionType

type SysparmActionType string

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp.

func (Timestamp) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.

type UpdateOptions

type UpdateOptions struct {
	DisplayValue DisplayValueType `url:"displayvalue,omitempty"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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