Documentation
¶
Index ¶
- Variables
- func Null[T any]() *param.Nullable[T]
- func Nullable[T any](v T) *param.Nullable[T]
- func Ptr[T any](v T) *T
- type Celitech
- func (c *Celitech) SetBaseURL(baseURL string)
- func (c *Celitech) SetClientID(clientID string)
- func (c *Celitech) SetClientSecret(clientSecret string)
- func (c *Celitech) SetEnvironment(environment Environment)
- func (c *Celitech) SetOAuthBaseURL(oAuthBaseURL string)
- func (c *Celitech) SetTimeout(timeout time.Duration)
- func (c *Celitech) SetTokenCache(cache TokenCache)
- type Config
- type Environment
- type OAuthToken
- type RequestOption
- type RetryConfig
- type TokenCache
Constants ¶
This section is empty.
Variables ¶
var NewConfig = celitechconfig.NewConfig
NewConfig creates a Config with spec-derived defaults.
var NewOAuthToken = oauthtokenmanager.NewOAuthToken
NewOAuthToken creates a new OAuthToken — use when implementing a custom TokenCache.
var NewRetryConfig = celitechconfig.NewRetryConfig
NewRetryConfig returns a RetryConfig initialized with spec-derived defaults.
var WithBaseURL = celitechconfig.WithBaseURL
WithBaseURL returns a RequestOption that overrides BaseURL for a single request.
var WithClientID = celitechconfig.WithClientID
WithClientID returns a RequestOption that overrides ClientID for a single request.
var WithClientSecret = celitechconfig.WithClientSecret
WithClientSecret returns a RequestOption that overrides ClientSecret for a single request.
var WithOAuthBaseURL = celitechconfig.WithOAuthBaseURL
WithOAuthBaseURL returns a RequestOption that overrides OAuthBaseURL for a single request.
var WithRetryConfig = celitechconfig.WithRetryConfig
WithRetryConfig returns a RequestOption that overrides the RetryConfig for a single request.
var WithTimeout = celitechconfig.WithTimeout
WithTimeout returns a RequestOption that overrides Timeout for a single request.
Functions ¶
func Null ¶
Null returns a *param.Nullable[T] with IsNull set to true, signalling an explicit JSON null.
Types ¶
type Celitech ¶
type Celitech struct {
Destinations *destinations.Service
Packages *packages.Service
Purchases *purchases.Service
ESim *esim.Service
IFrame *iframe.Service
// contains filtered or unexported fields
}
Celitech is the main SDK client that provides access to all service endpoints. It manages configuration, authentication, and service instances with centralized settings.
func NewCelitech ¶
func (*Celitech) SetBaseURL ¶
func (*Celitech) SetClientID ¶
func (*Celitech) SetClientSecret ¶
func (*Celitech) SetEnvironment ¶
func (c *Celitech) SetEnvironment(environment Environment)
SetEnvironment configures the SDK to use the specified environment's base URL.
func (*Celitech) SetOAuthBaseURL ¶
func (*Celitech) SetTimeout ¶
func (*Celitech) SetTokenCache ¶
func (c *Celitech) SetTokenCache(cache TokenCache)
SetTokenCache attaches a persistent token cache to the SDK.
type Config ¶
type Config = celitechconfig.Config
Config holds all configuration parameters for the SDK client.
type Environment ¶
type Environment = celitechconfig.Environment
Environment defines the available API base URLs.
const (
DefaultEnvironment Environment = celitechconfig.DefaultEnvironment
)
Environment constants for the available API base URLs.
type OAuthToken ¶
type OAuthToken = oauthtokenmanager.OAuthToken
OAuthToken represents a cached OAuth access token with scopes and optional expiry.
type RequestOption ¶
type RequestOption = celitechconfig.RequestOption
RequestOption is a function that configures a single request.
type RetryConfig ¶
type RetryConfig = celitechconfig.RetryConfig
RetryConfig holds all runtime-configurable retry parameters.
type TokenCache ¶
type TokenCache = oauthtokenmanager.TokenCache
TokenCache is the interface for persisting OAuth access tokens across process restarts. Implement this interface and pass it to SetTokenCache to enable token persistence.