servicenow

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents the main ServiceNow SDK client

func NewClient

func NewClient(config Config) (*Client, error)

NewClient creates a new ServiceNow SDK client with the provided configuration

func NewClientAPIKey

func NewClientAPIKey(instanceURL, apiKey string) (*Client, error)

NewClientAPIKey creates a new ServiceNow client with API key authentication

func NewClientBasicAuth

func NewClientBasicAuth(instanceURL, username, password string) (*Client, error)

NewClientBasicAuth creates a new ServiceNow client with basic authentication

func NewClientOAuth

func NewClientOAuth(instanceURL, clientID, clientSecret string) (*Client, error)

NewClientOAuth creates a new ServiceNow client with OAuth authentication

func NewClientOAuthRefresh

func NewClientOAuthRefresh(instanceURL, clientID, clientSecret, refreshToken string) (*Client, error)

NewClientOAuthRefresh creates a new ServiceNow client with OAuth refresh token

func (*Client) Aggregate

func (c *Client) Aggregate(tableName string) *aggregate.AggregateClient

Aggregate returns an aggregate client for the specified table name

func (*Client) Attachment

func (c *Client) Attachment() *attachment.AttachmentClient

Attachment returns an attachment client

func (*Client) Batch

func (c *Client) Batch() *batch.BatchClient

Batch returns a batch client for performing multiple operations in a single request

func (*Client) CMDB

func (c *Client) CMDB() *cmdb.CMDBClient

CMDB returns a CMDB client for managing Configuration Items and relationships

func (*Client) Catalog

func (c *Client) Catalog() *catalog.CatalogClient

Catalog returns a service catalog client for browsing catalogs and ordering items

func (*Client) Core

func (c *Client) Core() *core.Client

Core returns the underlying core client for advanced usage This allows access to raw HTTP client functionality when needed

func (*Client) GetRetryConfig

func (c *Client) GetRetryConfig() retry.Config

GetRetryConfig returns the current retry configuration

func (*Client) GetTimeout

func (c *Client) GetTimeout() time.Duration

GetTimeout returns the current request timeout

func (*Client) Identity

func (c *Client) Identity() *identity.IdentityClient

Identity returns an Identity and Access Management client for managing users, roles, and groups

func (*Client) ImportSet

func (c *Client) ImportSet() *importset.ImportSetClient

ImportSet returns an import set client

func (*Client) SetRateLimitConfig

func (c *Client) SetRateLimitConfig(config ratelimit.ServiceNowLimiterConfig)

SetRateLimitConfig updates the rate limiting configuration

func (*Client) SetRetryConfig

func (c *Client) SetRetryConfig(config retry.Config)

SetRetryConfig updates the retry configuration

func (*Client) SetTimeout

func (c *Client) SetTimeout(timeout time.Duration)

SetTimeout updates the request timeout

func (*Client) Table

func (c *Client) Table(tableName string) *table.TableClient

Table returns a table client for the specified table name

func (*Client) WithAggressiveRateLimit

func (c *Client) WithAggressiveRateLimit() *Client

WithAggressiveRateLimit applies more aggressive rate limiting (higher throughput)

func (*Client) WithAggressiveRetry

func (c *Client) WithAggressiveRetry() *Client

WithAggressiveRetry applies aggressive retry configuration

func (*Client) WithConservativeRateLimit

func (c *Client) WithConservativeRateLimit() *Client

WithConservativeRateLimit applies conservative rate limiting (safer for production)

func (*Client) WithMinimalRetry

func (c *Client) WithMinimalRetry() *Client

WithMinimalRetry applies minimal retry configuration

type Config

type Config struct {
	InstanceURL string
	// Authentication options (only one should be set)
	Username     string // For basic auth
	Password     string // For basic auth
	ClientID     string // For OAuth
	ClientSecret string // For OAuth
	RefreshToken string // For OAuth authorization code flow
	APIKey       string // For API key auth

	// Performance and reliability settings
	Timeout         time.Duration                      // Request timeout
	RetryConfig     *retry.Config                      // Retry configuration
	RateLimitConfig *ratelimit.ServiceNowLimiterConfig // Rate limiting configuration
}

Config holds configuration options for the ServiceNow client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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