Documentation
¶
Index ¶
- Constants
- Variables
- type CdmRequestBuilder
- func (rB *CdmRequestBuilder) Applications() *cdmapplicationsapi.ApplicationsRequestBuilder
- func (rB *CdmRequestBuilder) Changesets() *cdmchangesetapi.ChangesetsRequestBuilder
- func (rB *CdmRequestBuilder) Editor() *cdmeditorapi.CdmEditorRequestBuilder
- func (rB *CdmRequestBuilder) Policies() *policyapi.PoliciesRequestBuilder
- type NowRequestBuilder
- func (rB *NowRequestBuilder) Attachment() *attachmentapi.AttachmentRequestBuilderdeprecated
- func (rB *NowRequestBuilder) Attachment2() *attachmentapi.AttachmentRequestBuilder2
- func (rB *NowRequestBuilder) Batch() *batchapi.BatchRequestBuilder
- func (rB *NowRequestBuilder) Table(tableName string) *tableapi.TableRequestBuilderdeprecated
- func (rB *NowRequestBuilder) Table2(tableName string) *tableapi.TableRequestBuilderdeprecated
- func (rB *NowRequestBuilder) TableV2(tableName string) *tableapi.TableRequestBuilder2[*tableapi.TableRecord]
- type NowRequestBuilder2
- func (rB *NowRequestBuilder2) Account() *accountapi.AccountRequestBuilder
- func (rB *NowRequestBuilder2) ActSub() *actsubapi.ActSubRequestBuilder
- func (rB *NowRequestBuilder2) Attachment() *attachmentapi.AttachmentRequestBuilder2
- func (rB *NowRequestBuilder2) Batch() *batchapi.BatchRequestBuilder
- func (rB *NowRequestBuilder2) Cmdb() *cmdbinstanceapi.CmdbRequestBuilder
- func (rB *NowRequestBuilder2) Documents() *documentsapi.DocumentsRequestBuilder
- func (rB *NowRequestBuilder2) Table(tableName string) *tableapi.TableRequestBuilder2[*tableapi.TableRecord]
- type ServiceNowClient
- func NewServiceNowClient(credential core.Credential, instance string) *ServiceNowClientdeprecated
- func NewServiceNowClient2(credential core.Credential, instance string) (*ServiceNowClient, error)
- func NewServiceNowClient2WithHTTPClient(credential core.Credential, instance string, httpClient *http.Client) (*ServiceNowClient, error)
- func (c *ServiceNowClient) Cdm() *CdmRequestBuilder
- func (c *ServiceNowClient) Now() *NowRequestBuilderdeprecated
- func (c *ServiceNowClient) Now2() *NowRequestBuilder
- func (c *ServiceNowClient) Send(requestInfo core.IRequestInformation, errorMapping core.ErrorMapping) (*http.Response, error)
- func (c *ServiceNowClient) SendWithContext(ctx context.Context, requestInfo core.IRequestInformation, ...) (*http.Response, error)
- type ServiceNowServiceClient
- func (rB *ServiceNowServiceClient) AppointmentBooking() *appointmentbookingapi.AppointmentBookingRequestBuilder
- func (rB *ServiceNowServiceClient) Cdm() *CdmRequestBuilder
- func (rB *ServiceNowServiceClient) CustomerService() *caseapi.CustomerServiceRequestBuilder
- func (rB *ServiceNowServiceClient) Now() *NowRequestBuilder2
- type ServiceNowServiceClientConfig
- type ServiceNowServiceClientOption
- func WithAuthenticationProvider(authenticationProvider authentication.AuthenticationProvider) ServiceNowServiceClientOption
- func WithBackingStoreFactory(backingStoreFactory store.BackingStoreFactory) ServiceNowServiceClientOption
- func WithHTTPClient(client *http.Client) ServiceNowServiceClientOption
- func WithInstance(instance string) ServiceNowServiceClientOption
- func WithMiddleware(middleware ...nethttplibrary.Middleware) ServiceNowServiceClientOption
- func WithRequestAdapter(requestAdapter abstractions.RequestAdapter) ServiceNowServiceClientOption
- func WithURL(uri string) ServiceNowServiceClientOption
Constants ¶
const Version = "1.12.0"
Version is the current version of the SDK x-release-please-start-version
Variables ¶
var ( ErrNilRequestInfo = errors.New("requestInfo cannot be nil") ErrNilContext = errors.New("ctx cannot be nil") )
Functions ¶
This section is empty.
Types ¶
type CdmRequestBuilder ¶ added in v1.11.0
type CdmRequestBuilder struct {
internal.RequestBuilder
}
CdmRequestBuilder provides operations to manage Service-Now CDM.
func NewCdmRequestBuilder ¶ added in v1.11.0
func NewCdmRequestBuilder(rawURL string, requestAdapter abstractions.RequestAdapter) *CdmRequestBuilder
NewCdmRequestBuilder instantiates a new CdmRequestBuilder with the provided path parameters and request adapter.
func NewCdmRequestBuilderInternal ¶ added in v1.11.0
func NewCdmRequestBuilderInternal(pathParameters map[string]string, requestAdapter abstractions.RequestAdapter) *CdmRequestBuilder
func (*CdmRequestBuilder) Applications ¶ added in v1.12.0
func (rB *CdmRequestBuilder) Applications() *cdmapplicationsapi.ApplicationsRequestBuilder
Applications returns a ApplicationsRequestBuilder associated with the CdmRequestBuilder.
func (*CdmRequestBuilder) Changesets ¶ added in v1.12.0
func (rB *CdmRequestBuilder) Changesets() *cdmchangesetapi.ChangesetsRequestBuilder
Changesets returns a ChangesetsRequestBuilder associated with the CdmRequestBuilder.
func (*CdmRequestBuilder) Editor ¶ added in v1.12.0
func (rB *CdmRequestBuilder) Editor() *cdmeditorapi.CdmEditorRequestBuilder
Editor returns a CdmEditorRequestBuilder associated with the CdmRequestBuilder.
func (*CdmRequestBuilder) Policies ¶ added in v1.11.0
func (rB *CdmRequestBuilder) Policies() *policyapi.PoliciesRequestBuilder
Policies returns a PolicyRequestBuilder associated with the CdmRequestBuilder.
type NowRequestBuilder ¶
type NowRequestBuilder struct {
core.RequestBuilder
}
DEPRECATED: deprecated since v1.11.0. Please use NowRequestBuilder2
func NewNowRequestBuilder
deprecated
func NewNowRequestBuilder(url string, client core.Client) *NowRequestBuilder
Deprecated: deprecated since v1.8.0. Please use NewNowRequestBuilder2.
NewNowRequestBuilder creates a new instance of the NowRequestBuilder associated with the given URL and Client. It accepts the URL and Client as parameters and returns a pointer to the created NowRequestBuilder
func NewNowRequestBuilder2 ¶ added in v1.9.1
func NewNowRequestBuilder2(url string, client core.Client2) *NowRequestBuilder
DEPRECATED: deprecated since v1.11.0. Please use NewServiceNowRequestBuilder3
NewNowRequestBuilder2
func (*NowRequestBuilder) Attachment
deprecated
added in
v1.1.0
func (rB *NowRequestBuilder) Attachment() *attachmentapi.AttachmentRequestBuilder
Deprecated: deprecated since v1.8.0. Please use Attachment2.
Attachment returns an AttachmentRequestBuilder associated with the NowRequestBuilder. It allows you to work with attachments and manage attachments in ServiceNow.
func (*NowRequestBuilder) Attachment2 ¶ added in v1.9.1
func (rB *NowRequestBuilder) Attachment2() *attachmentapi.AttachmentRequestBuilder2
Attachment returns an AttachmentRequestBuilder associated with the NowRequestBuilder. It allows you to work with attachments and manage attachments in ServiceNow.
func (*NowRequestBuilder) Batch ¶ added in v1.7.0
func (rB *NowRequestBuilder) Batch() *batchapi.BatchRequestBuilder
Batch returns a BatchRequestBuilder, entrypoint into the batch api.
func (*NowRequestBuilder) Table
deprecated
func (rB *NowRequestBuilder) Table(tableName string) *tableapi.TableRequestBuilder
Deprecated: deprecated since v1.8.0. Please use Table2.
Table returns a TableRequestBuilder associated with the NowRequestBuilder. It accepts a table name as a parameter and constructs the URL for table-related requests. The returned TableRequestBuilder can be used to build and execute table-related requests.
func (*NowRequestBuilder) Table2
deprecated
added in
v1.9.1
func (rB *NowRequestBuilder) Table2(tableName string) *tableapi.TableRequestBuilder
Deprecated: deprecated since v1.9.0. Please use NowRequestBuilder.TableV2
func (*NowRequestBuilder) TableV2 ¶ added in v1.9.1
func (rB *NowRequestBuilder) TableV2(tableName string) *tableapi.TableRequestBuilder2[*tableapi.TableRecord]
TableV2 returns a TableRequestBuilder2 associated with the NowRequestBuilder.
type NowRequestBuilder2 ¶ added in v1.11.0
type NowRequestBuilder2 struct {
internal.RequestBuilder
}
func NewServiceNowRequestBuilder3 ¶ added in v1.11.0
func NewServiceNowRequestBuilder3( rawURL string, requestAdapter abstractions.RequestAdapter, ) *NowRequestBuilder2
func NewServiceNowRequestBuilder3Internal ¶ added in v1.11.0
func NewServiceNowRequestBuilder3Internal(pathParameters map[string]string, requestAdapter abstractions.RequestAdapter) *NowRequestBuilder2
func (*NowRequestBuilder2) Account ¶ added in v1.12.0
func (rB *NowRequestBuilder2) Account() *accountapi.AccountRequestBuilder
Account returns an AccountRequestBuilder associated with the NowRequestBuilder.
func (*NowRequestBuilder2) ActSub ¶ added in v1.12.0
func (rB *NowRequestBuilder2) ActSub() *actsubapi.ActSubRequestBuilder
ActSub returns an ActSubRequestBuilder associated with the NowRequestBuilder.
func (*NowRequestBuilder2) Attachment ¶ added in v1.11.0
func (rB *NowRequestBuilder2) Attachment() *attachmentapi.AttachmentRequestBuilder2
func (*NowRequestBuilder2) Batch ¶ added in v1.11.0
func (rB *NowRequestBuilder2) Batch() *batchapi.BatchRequestBuilder
func (*NowRequestBuilder2) Cmdb ¶ added in v1.12.0
func (rB *NowRequestBuilder2) Cmdb() *cmdbinstanceapi.CmdbRequestBuilder
Cmdb returns a CmdbRequestBuilder associated with the NowRequestBuilder.
func (*NowRequestBuilder2) Documents ¶ added in v1.12.0
func (rB *NowRequestBuilder2) Documents() *documentsapi.DocumentsRequestBuilder
Documents returns a DocumentsRequestBuilder associated with the NowRequestBuilder.
func (*NowRequestBuilder2) Table ¶ added in v1.11.0
func (rB *NowRequestBuilder2) Table(tableName string) *tableapi.TableRequestBuilder2[*tableapi.TableRecord]
type ServiceNowClient ¶
type ServiceNowClient struct {
// Deprecated: deprecated since v1.6.0.
Credential core.Credential
BaseUrl string
Session webClient
RequestAdapter abstractions.RequestAdapter
// contains filtered or unexported fields
}
DEPRECATED: deprecated since v1.11.0. Please use ServiceNowServiceClient
func NewServiceNowClient
deprecated
func NewServiceNowClient(credential core.Credential, instance string) *ServiceNowClient
Deprecated: deprecated since v1.6.0. Please use `NewServiceNowClient2` instead.
NewServiceNowClient creates a new instance of the ServiceNow client. It accepts a UsernamePasswordCredential and an instance URL. If the instance URL does not end with ".service-now.com/api", it appends the suffix. It returns a pointer to the Client.
func NewServiceNowClient2 ¶ added in v1.6.0
func NewServiceNowClient2(credential core.Credential, instance string) (*ServiceNowClient, error)
DEPRECATED: deprecated since v1.11.0. Please use NewServiceNowServiceClient
NewServiceNowClient2 creates a new instance of the ServiceNow client. It accepts a UsernamePasswordCredential and an instance URL. If the instance URL does not end with ".service-now.com/api", it appends the suffix. It returns a pointer to the Client.
func NewServiceNowClient2WithHTTPClient ¶ added in v1.9.1
func NewServiceNowClient2WithHTTPClient(credential core.Credential, instance string, httpClient *http.Client) (*ServiceNowClient, error)
func (*ServiceNowClient) Cdm ¶ added in v1.11.0
func (c *ServiceNowClient) Cdm() *CdmRequestBuilder
Cdm returns a CdmRequestBuilder associated with the Client. It prepares the CdmRequestBuilder with the base URL for the ServiceNow instance.
func (*ServiceNowClient) Now
deprecated
func (c *ServiceNowClient) Now() *NowRequestBuilder
Deprecated: deprecated since v1.8.0. Please use Now2.
Now returns a NowRequestBuilder associated with the Client. It prepares the NowRequestBuilder with the base URL for the ServiceNow instance.
func (*ServiceNowClient) Now2 ¶ added in v1.9.1
func (c *ServiceNowClient) Now2() *NowRequestBuilder
Now2 returns a NowRequestBuilder associated with the Client. It prepares the NowRequestBuilder with the base URL for the ServiceNow instance.
func (*ServiceNowClient) Send ¶
func (c *ServiceNowClient) Send(requestInfo core.IRequestInformation, errorMapping core.ErrorMapping) (*http.Response, error)
func (*ServiceNowClient) SendWithContext ¶
func (c *ServiceNowClient) SendWithContext(ctx context.Context, requestInfo core.IRequestInformation, errorMapping core.ErrorMapping) (*http.Response, error)
type ServiceNowServiceClient ¶ added in v1.11.0
type ServiceNowServiceClient struct {
newInternal.RequestBuilder
}
ServiceNowServiceClient is the core service used by ServiceNowServiceClient to make requests to Service-Now's APIs
func NewServiceNowServiceClient ¶ added in v1.11.0
func NewServiceNowServiceClient(opts ...ServiceNowServiceClientOption) (*ServiceNowServiceClient, error)
NewServiceNowServiceClient creates a new ServiceNowServiceClient using the provided options.
func (*ServiceNowServiceClient) AppointmentBooking ¶ added in v1.12.0
func (rB *ServiceNowServiceClient) AppointmentBooking() *appointmentbookingapi.AppointmentBookingRequestBuilder
func (*ServiceNowServiceClient) Cdm ¶ added in v1.11.0
func (rB *ServiceNowServiceClient) Cdm() *CdmRequestBuilder
func (*ServiceNowServiceClient) CustomerService ¶ added in v1.12.0
func (rB *ServiceNowServiceClient) CustomerService() *caseapi.CustomerServiceRequestBuilder
func (*ServiceNowServiceClient) Now ¶ added in v1.11.0
func (rB *ServiceNowServiceClient) Now() *NowRequestBuilder2
type ServiceNowServiceClientConfig ¶ added in v1.11.0
type ServiceNowServiceClientConfig struct {
// contains filtered or unexported fields
}
ServiceNowServiceClientConfig represents possible configurations for the Service-Now service client.
func (*ServiceNowServiceClientConfig) Validate ¶ added in v1.11.0
func (c *ServiceNowServiceClientConfig) Validate() error
Validate checks if the configuration is valid.
type ServiceNowServiceClientOption ¶ added in v1.11.0
type ServiceNowServiceClientOption func(*ServiceNowServiceClientConfig) error
ServiceNowServiceClientOption is a function type that modifies the ServiceNowServiceClientConfig. It returns an error if the modification is not successful.
func WithAuthenticationProvider ¶ added in v1.11.0
func WithAuthenticationProvider(authenticationProvider authentication.AuthenticationProvider) ServiceNowServiceClientOption
WithAuthenticationProvider sets the authentication provider for the ServiceNowServiceClient.
func WithBackingStoreFactory ¶ added in v1.11.0
func WithBackingStoreFactory(backingStoreFactory store.BackingStoreFactory) ServiceNowServiceClientOption
WithBackingStoreFactory creates an option to set the backingStoreFactory for the ServiceNowServiceClient. It returns an error if the provided factory is nil.
func WithHTTPClient ¶ added in v1.11.0
func WithHTTPClient(client *http.Client) ServiceNowServiceClientOption
WithHTTPClient creates an option to set the HTTP client used by the requests.
func WithInstance ¶ added in v1.11.0
func WithInstance(instance string) ServiceNowServiceClientOption
WithInstance creates an option to set the instance of the default ServiceNow URL for the requests. It returns an error if the provided configuration is nil or the instance string is empty.
func WithMiddleware ¶ added in v1.11.0
func WithMiddleware(middleware ...nethttplibrary.Middleware) ServiceNowServiceClientOption
WithMiddleware creates an option to set the middleware used by the requests. It returns an error if the provided configuration is nil or the middleware slice is empty.
func WithRequestAdapter ¶ added in v1.11.0
func WithRequestAdapter(requestAdapter abstractions.RequestAdapter) ServiceNowServiceClientOption
WithRequestAdapter sets a pre-configured RequestAdapter for the ServiceNowServiceClient.
func WithURL ¶ added in v1.11.0
func WithURL(uri string) ServiceNowServiceClientOption
WithURL creates an option to set the base URL for the requests. It returns an error if the provided configuration is nil or the URL is empty.
Source Files
¶
- cdm_request_builder.go
- credential_authorization_provider_adapter.go
- errors.go
- mocking.go
- now_request_builder.go
- now_request_builder2.go
- now_request_builder_deprecated.go
- servicenow_client.go
- servicenow_client_deprecated.go
- servicenow_service_client.go
- servicenow_service_client_config.go
- servicenow_service_client_option.go
- version.go
