Documentation
¶
Index ¶
- type Client
- func NewClient(config Config) (*Client, error)
- func NewClientAPIKey(instanceURL, apiKey string) (*Client, error)
- func NewClientBasicAuth(instanceURL, username, password string) (*Client, error)
- func NewClientOAuth(instanceURL, clientID, clientSecret string) (*Client, error)
- func NewClientOAuthRefresh(instanceURL, clientID, clientSecret, refreshToken string) (*Client, error)
- func (c *Client) Aggregate(tableName string) *aggregate.AggregateClient
- func (c *Client) Attachment() *attachment.AttachmentClient
- func (c *Client) Batch() *batch.BatchClient
- func (c *Client) CMDB() *cmdb.CMDBClient
- func (c *Client) Catalog() *catalog.CatalogClient
- func (c *Client) Core() *core.Client
- func (c *Client) GetRetryConfig() retry.Config
- func (c *Client) GetTimeout() time.Duration
- func (c *Client) Identity() *identity.IdentityClient
- func (c *Client) ImportSet() *importset.ImportSetClient
- func (c *Client) SetRateLimitConfig(config ratelimit.ServiceNowLimiterConfig)
- func (c *Client) SetRetryConfig(config retry.Config)
- func (c *Client) SetTimeout(timeout time.Duration)
- func (c *Client) Table(tableName string) *table.TableClient
- func (c *Client) WithAggressiveRateLimit() *Client
- func (c *Client) WithAggressiveRetry() *Client
- func (c *Client) WithConservativeRateLimit() *Client
- func (c *Client) WithMinimalRetry() *Client
- type Config
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 NewClientAPIKey ¶
NewClientAPIKey creates a new ServiceNow client with API key authentication
func NewClientBasicAuth ¶
NewClientBasicAuth creates a new ServiceNow client with basic authentication
func NewClientOAuth ¶
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 ¶
Core returns the underlying core client for advanced usage This allows access to raw HTTP client functionality when needed
func (*Client) GetRetryConfig ¶
GetRetryConfig returns the current retry configuration
func (*Client) GetTimeout ¶
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 ¶
SetRetryConfig updates the retry configuration
func (*Client) SetTimeout ¶
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 ¶
WithAggressiveRateLimit applies more aggressive rate limiting (higher throughput)
func (*Client) WithAggressiveRetry ¶
WithAggressiveRetry applies aggressive retry configuration
func (*Client) WithConservativeRateLimit ¶
WithConservativeRateLimit applies conservative rate limiting (safer for production)
func (*Client) WithMinimalRetry ¶
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