Documentation ¶
Index ¶
- type APIErrorResponse
- type ConnectedResponse
- type ServiceNowEvent
- type ServiceNowPartialRecord
- type ServiceNowPartialRecordsResult
- type ServiceNowRecord
- type ServiceNowRecordResult
- type SubscriptionAuthDetails
- type SubscriptionAuthPayload
- type SubscriptionPayload
- type SubscriptionResponse
- type SubscriptionResult
- type SubscriptionsResult
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIErrorResponse ¶ added in v1.0.0
type APIErrorResponse struct { ID string `json:"id"` Message string `json:"message"` StatusCode int `json:"-"` }
Error struct to store error ids and error message.
func (*APIErrorResponse) Error ¶ added in v1.0.0
func (a *APIErrorResponse) Error() string
type ConnectedResponse ¶ added in v1.0.0
type ConnectedResponse struct {
Connected bool `json:"connected"`
}
type ServiceNowEvent ¶ added in v1.0.0
type ServiceNowEvent struct { SubscriptionID string `json:"sys_id"` RecordID string `json:"record_id"` ChannelID string `json:"mm_channel_id"` UserID string `json:"mm_user_id"` SubscriptionType string `json:"type"` RecordType string `json:"record_type"` RecordTypeName string `json:"record_type_name"` Events string `json:"subscription_events"` Number string `json:"number"` ShortDescription string `json:"short_description"` State string `json:"state"` Priority string `json:"priority"` AssignedTo string `json:"assigned_to"` AssignmentGroup string `json:"assignment_group"` // TODO: Remove the nolint comment by changing spelling of occurred in the update set XML EventOccured string `json:"event_occured"` // nolint }
func ServiceNowEventFromJSON ¶ added in v1.0.0
func ServiceNowEventFromJSON(data io.Reader) (*ServiceNowEvent, error)
func (*ServiceNowEvent) CreateNotificationPost ¶ added in v1.0.0
func (se *ServiceNowEvent) CreateNotificationPost(botID, serviceNowURL string) *model.Post
type ServiceNowPartialRecord ¶ added in v1.0.0
type ServiceNowPartialRecordsResult ¶ added in v1.0.0
type ServiceNowPartialRecordsResult struct {
Result []*ServiceNowPartialRecord `json:"result"`
}
type ServiceNowRecord ¶ added in v1.0.0
type ServiceNowRecord struct { SysID string `json:"sys_id"` Number string `json:"number"` ShortDescription string `json:"short_description"` State string `json:"state"` Priority string `json:"priority"` AssignedTo interface{} `json:"assigned_to"` AssignmentGroup interface{} `json:"assignment_group"` }
type ServiceNowRecordResult ¶ added in v1.0.0
type ServiceNowRecordResult struct {
Result *ServiceNowRecord `json:"result"`
}
type SubscriptionAuthDetails ¶
type SubscriptionAuthDetails struct {
Result []*SubscriptionAuthPayload `json:"result"`
}
type SubscriptionAuthPayload ¶
type SubscriptionPayload ¶
type SubscriptionPayload struct { ChannelID *string `json:"channel_id"` UserID *string `json:"user_id"` Type *string `json:"type"` RecordType *string `json:"record_type"` RecordID *string `json:"record_id"` IsActive *bool `json:"is_active"` SubscriptionEvents *string `json:"subscription_events"` ServerURL *string `json:"server_url"` }
func SubscriptionFromJSON ¶ added in v1.0.0
func SubscriptionFromJSON(data io.Reader) (*SubscriptionPayload, error)
func (*SubscriptionPayload) IsValidForCreation ¶ added in v0.1.2
func (s *SubscriptionPayload) IsValidForCreation(siteURL string) error
func (*SubscriptionPayload) IsValidForUpdation ¶ added in v0.1.2
func (s *SubscriptionPayload) IsValidForUpdation(siteURL string) error
type SubscriptionResponse ¶
type SubscriptionResponse struct { SysID string `json:"sys_id"` UserID string `json:"user_id"` ChannelID string `json:"channel_id"` RecordType string `json:"record_type"` RecordID string `json:"record_id"` SubscriptionEvents string `json:"subscription_events"` Type string `json:"type"` ServerURL string `json:"server_url"` IsActive string `json:"is_active"` Number string `json:"number"` ShortDescription string `json:"short_description"` }
func (*SubscriptionResponse) GetFormattedSubscription ¶ added in v1.0.0
func (s *SubscriptionResponse) GetFormattedSubscription() string
type SubscriptionResult ¶ added in v0.1.2
type SubscriptionResult struct {
Result *SubscriptionResponse `json:"result"`
}
type SubscriptionsResult ¶
type SubscriptionsResult struct {
Result []*SubscriptionResponse `json:"result"`
}
Click to show internal directories.
Click to hide internal directories.