Documentation
¶
Index ¶
- func DoRequest(method string, endpointUrl string, header http.Header, payload io.Reader, ...) error
- type Config
- type Consumer
- type ConsumerGetResponse
- type ConsumerListResponse
- type Contact
- type ContactGetResponse
- type ContactListResponse
- type HTTPError
- type NowConsumer
- type NowContact
- type NowTable
- type OAuthTokenResponse
- type ServiceNow
- type SnChgRestChange
- type SnChgRestChangeCi
- type SnChgRestChangeModel
- type SnChgRestChangeTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Consumer ¶
type Consumer struct { Active string `json:"active"` BusinessPhone string `json:"business_phone"` City string `json:"city"` Country string `json:"country"` DateFormat string `json:"date_format"` Email string `json:"email"` Fax string `json:"fax"` FirstName string `json:"first_name"` Gender string `json:"gender"` HomePhone string `json:"home_phone"` Household string `json:"household"` LastName string `json:"last_name"` MiddleName string `json:"middle_name"` MobilePhone string `json:"mobile_phone"` Name string `json:"name"` Notes string `json:"notes"` Notification string `json:"notification"` Number string `json:"number"` Photo string `json:"photo"` PreferredLanguage string `json:"preferred_language"` Prefix string `json:"prefix"` Primary string `json:"primary"` State string `json:"state"` Street string `json:"street"` Suffix string `json:"suffix"` SysCreatedBy string `json:"sys_created_by"` SysCreatedOn string `json:"sys_created_on"` SysDomain string `json:"sys_domain"` SysID string `json:"sys_id"` SysModCount string `json:"sys_mod_count"` SysTags string `json:"sys_tags"` SysUpdatedBy string `json:"sys_updated_by"` SysUpdatedOn string `json:"sys_updated_on"` TimeFormat string `json:"time_format"` TimeZone string `json:"time_zone"` Title string `json:"title"` User string `json:"user"` Zip string `json:"zip"` }
type ConsumerGetResponse ¶
type ConsumerGetResponse struct {
Result Consumer `json:"result"`
}
type ConsumerListResponse ¶
type ConsumerListResponse struct {
Result []Consumer `json:"result"`
}
type Contact ¶
type Contact struct { Account string `json:"account"` Active string `json:"active"` AgentStatus string `json:"agent_status"` Building string `json:"building"` CalendarIntegration string `json:"calendar_integration"` City string `json:"city"` Company string `json:"company"` CostCenter string `json:"cost_center"` Country string `json:"country"` DateFormat string `json:"date_format"` DefaultPerspective string `json:"default_perspective"` Department string `json:"department"` EduStatus string `json:"edu_status"` Email string `json:"email"` EmployeeNumber string `json:"employee_number"` EnableMultifactorAuthn string `json:"enable_multifactor_authn"` FailedAttempts string `json:"failed_attempts"` FirstName string `json:"first_name"` Gender string `json:"gender"` GeolocationTracked string `json:"geolocation_tracked"` HomePhone string `json:"home_phone"` InternalIntegrationUser string `json:"internal_integration_user"` Introduction string `json:"introduction"` LastLogin string `json:"last_login"` LastLoginDevice string `json:"last_login_device"` LastLoginTime string `json:"last_login_time"` LastName string `json:"last_name"` LastPositionUpdate string `json:"last_position_update"` Latitude string `json:"latitude"` LdapServer string `json:"ldap_server"` Location string `json:"location"` LockedOut string `json:"locked_out"` Longitude string `json:"longitude"` Manager string `json:"manager"` MiddleName string `json:"middle_name"` MobilePhone string `json:"mobile_phone"` Name string `json:"name"` Notification string `json:"notification"` OnSchedule string `json:"on_schedule"` Phone string `json:"phone"` Photo string `json:"photo"` PreferredLanguage string `json:"preferred_language"` Roles string `json:"roles"` Schedule string `json:"schedule"` Source string `json:"source"` State string `json:"state"` Street string `json:"street"` SysClassName string `json:"sys_class_name"` SysCreatedBy string `json:"sys_created_by"` SysCreatedOn string `json:"sys_created_on"` SysDomain string `json:"sys_domain"` SysDomainPath string `json:"sys_domain_path"` SysID string `json:"sys_id"` SysModCount string `json:"sys_mod_count"` SysTags string `json:"sys_tags"` SysUpdatedBy string `json:"sys_updated_by"` SysUpdatedOn string `json:"sys_updated_on"` TimeFormat string `json:"time_format"` TimeSheetPolicy string `json:"time_sheet_policy"` TimeZone string `json:"time_zone"` Title string `json:"title"` UserName string `json:"user_name"` Vip string `json:"vip"` WebServiceAccessOnly string `json:"web_service_access_only"` Zip string `json:"zip"` }
type ContactGetResponse ¶
type ContactGetResponse struct {
Result Contact `json:"result"`
}
type ContactListResponse ¶
type ContactListResponse struct {
Result []Contact `json:"result"`
}
type NowConsumer ¶
type NowConsumer struct {
*ServiceNow
}
func (*NowConsumer) Get ¶
func (sn *NowConsumer) Get(sysId string) (*ConsumerGetResponse, error)
Get consumer details.
func (*NowConsumer) List ¶
func (sn *NowConsumer) List(limit, offset int) (*ConsumerListResponse, error)
List all consumers.
type NowContact ¶
type NowContact struct {
*ServiceNow
}
func (*NowContact) Get ¶
func (sn *NowContact) Get(sysId string) (*ContactGetResponse, error)
Get contact details.
func (*NowContact) List ¶
func (sn *NowContact) List(limit, offset int) (*ContactListResponse, error)
List all contacts.
type NowTable ¶
type NowTable struct {
*ServiceNow
}
func (*NowTable) Get ¶
func (sn *NowTable) Get(tableName string, sysId string, excludeReferenceLink bool, result interface{}) error
Get table details.
type OAuthTokenResponse ¶
type ServiceNow ¶
type ServiceNow struct { NowContact *NowContact NowConsumer *NowConsumer NowTable *NowTable SnChgRestChange *SnChgRestChange SnChgRestChangeModel *SnChgRestChangeModel SnChgRestChangeTask *SnChgRestChangeTask SnChgRestChangeCi *SnChgRestChangeCi // contains filtered or unexported fields }
func New ¶
func New(config Config) (serviceNow *ServiceNow, err error)
New creates a new ServiceNow client by authenticating using the supplied credentials.
type SnChgRestChange ¶
type SnChgRestChange struct {
*ServiceNow
}
func (*SnChgRestChange) Get ¶
func (sn *SnChgRestChange) Get(sysId string, result interface{}) error
Get change details.
type SnChgRestChangeCi ¶
type SnChgRestChangeCi struct {
*ServiceNow
}
type SnChgRestChangeModel ¶
type SnChgRestChangeModel struct {
*ServiceNow
}
func (*SnChgRestChangeModel) Get ¶
func (sn *SnChgRestChangeModel) Get(sysId string, result interface{}) error
Get change model details.
type SnChgRestChangeTask ¶
type SnChgRestChangeTask struct {
*ServiceNow
}
Click to show internal directories.
Click to hide internal directories.