Versions in this module Expand all Collapse all v0 v0.5.0 Oct 27, 2026 Changes in this version + type EndpointRateLimits struct + LimitByIP bool + Limits []RateLimit type MethodRateLimit + LimitByIP bool type RateLimitOverrides + LimitByIP *bool v0.4.1 Oct 5, 2026 v0.4.0 Sep 29, 2026 Changes in this version + const DestinationAzure + const DestinationKafka + const DestinationPostgres + const DestinationS3 + const DestinationWebhook + const KVBatchLimit + const StreamRangeUnset + const StreamStatusActive + const StreamStatusCompleted + const StreamStatusPaused + const StreamStatusTerminated + var KVKeyPattern = regexp.MustCompile(`^[A-Za-z0-9 ._:$-]+$`) + type AzureDestination struct + BlobPrefix string + Container string + FileCompressionType string + FileType string + MaxRetry int64 + RetryIntervalSec int64 + SASToken string + StorageAccount string type Client + func (c *Client) ActivateStream(ctx context.Context, id string) error + func (c *Client) CreateKVList(ctx context.Context, key string, items []string) error + func (c *Client) CreateStream(ctx context.Context, input StreamInput) (*Stream, error) + func (c *Client) DeleteKVList(ctx context.Context, key string) error + func (c *Client) DeleteKVValue(ctx context.Context, key string) error + func (c *Client) DeleteStream(ctx context.Context, id string) error + func (c *Client) GetKVList(ctx context.Context, key string) ([]string, error) + func (c *Client) GetKVValue(ctx context.Context, key string) (string, error) + func (c *Client) GetStream(ctx context.Context, id string) (*Stream, error) + func (c *Client) PauseStream(ctx context.Context, id string) error + func (c *Client) SetKVValue(ctx context.Context, key, value string) error + func (c *Client) UpdateKVList(ctx context.Context, key string, add, remove []string) error + func (c *Client) UpdateStream(ctx context.Context, id string, update StreamUpdate) (*Stream, error) + type HeaderMap map[string]string + func (h *HeaderMap) UnmarshalJSON(raw []byte) error + func (h HeaderMap) MarshalJSON() ([]byte, error) + type KafkaDestination struct + BatchSize int64 + BootstrapServers string + CompressionType string + LingerMs int64 + MaxMessageBytes int64 + MaxRetry int64 + Mechanisms string + Password string + Protocol string + RetryIntervalSec int64 + SSLCAPEM string + SSLCertificatePEM string + SSLKeyPEM string + TimeoutSec int64 + TopicName string + Username string type Option + func WithUserAgent(userAgent string) Option + type PostgresDestination struct + Database string + Host string + MaxRetry int64 + Password string + Port int64 + RetryIntervalSec int64 + SSLMode string + TableName string + Username string + type S3Destination struct + AccessKey string + Bucket string + Endpoint string + FileCompressionType string + FileType string + MaxRetry int64 + ObjectPrefix string + Region string + RetryIntervalSec int64 + SecretKey string + UseSSL bool + type Stream struct + Dataset string + DatasetBatchSize int64 + Destination StreamDestination + ElasticBatchEnabled bool + EndRange int64 + ExtraDestinations []StreamDestination + FilterFunction string + FilterLanguage string + FixBlockReorgs int64 + ID string + KeepDistanceFromTip int64 + Name string + Network string + NotificationEmail string + Region string + RestreamBatchOnReorg bool + Sequence int64 + StartRange int64 + Status string + type StreamDestination struct + Azure *AzureDestination + Kafka *KafkaDestination + Postgres *PostgresDestination + S3 *S3Destination + Webhook *WebhookDestination + func (d *StreamDestination) UnmarshalJSON(raw []byte) error + func (d StreamDestination) MarshalJSON() ([]byte, error) + func (d StreamDestination) Type() string + type StreamInput struct + Dataset string + DatasetBatchSize int64 + Destination StreamDestination + ElasticBatchEnabled bool + EndRange *int64 + ExtraDestinations []StreamDestination + FilterFunction string + FilterLanguage string + FixBlockReorgs *int64 + KeepDistanceFromTip *int64 + Name string + Network string + NotificationEmail *string + Region string + RestreamBatchOnReorg *bool + StartRange *int64 + Status string + type StreamUpdate struct + DatasetBatchSize *int64 + Destination *StreamDestination + ElasticBatchEnabled *bool + EndRange *int64 + ExtraDestinations *[]StreamDestination + FilterFunction *string + FilterLanguage *string + FixBlockReorgs *int64 + KeepDistanceFromTip *int64 + Name *string + NotificationEmail *string + RestreamBatchOnReorg *bool + StartRange *int64 + type WebhookDestination struct + Compression string + Headers HeaderMap + MTLS *bool + MaxRetry int64 + PostTimeoutSec int64 + RetryIntervalSec int64 + SSLCAPEM string + SecurityToken string + URL string v0.3.0 Sep 25, 2026 Changes in this version + func IsAlreadyExists(err error) bool v0.2.0 Sep 25, 2026 Changes in this version + func EndpointURLWithToken(raw, token string) string type Client + func (c *Client) GetEndpointURLs(ctx context.Context, id string) (*EndpointURLs, error) + type EndpointURLs struct + Multichain map[string]NetworkURLs + type NetworkURLs struct + HTTPURLWithToken string + SafeHTTPURL string + SafeWSSURL string + WSSURLWithToken string v0.1.0 Sep 25, 2026 Changes in this version + const BucketRPD + const BucketRPM + const BucketRPS + const DefaultBaseURL + const RateLimitUnset + const SourcePlanDefault + const SourceUserOverride + const URLTokenPlaceholder + func IsNotFound(err error) bool + func IsUnauthorized(err error) bool + func RedactEndpointURL(raw string) string + type Chain struct + IsSelectChain bool + Networks []Network + Slug string + type Client struct + func New(apiKey string, opts ...Option) (*Client, error) + func (c *Client) AddDomainMask(ctx context.Context, endpointID, domainMask string) (*SecurityEntry, error) + func (c *Client) AddEndpointIP(ctx context.Context, endpointID, ip string) (*SecurityEntry, error) + func (c *Client) AddEndpointTag(ctx context.Context, id, label string) error + func (c *Client) AddEndpointToken(ctx context.Context, endpointID string) (*EndpointToken, error) + func (c *Client) AddJWT(ctx context.Context, endpointID string, jwt JWT) (*JWT, error) + func (c *Client) AddMethodRateLimit(ctx context.Context, endpointID string, limiter MethodRateLimit) (*MethodRateLimit, error) + func (c *Client) AddReferrer(ctx context.Context, endpointID, referrer string) (*SecurityEntry, error) + func (c *Client) AddRequestFilter(ctx context.Context, endpointID string, methods []string) (*RequestFilter, error) + func (c *Client) CreateEndpoint(ctx context.Context, chain, network string) (*Endpoint, error) + func (c *Client) DeleteEndpoint(ctx context.Context, id string) error + func (c *Client) DeleteIPCustomHeader(ctx context.Context, endpointID string) error + func (c *Client) DeleteRateLimitOverride(ctx context.Context, endpointID, overrideID string) error + func (c *Client) FindEndpointByLabel(ctx context.Context, label string) (*EndpointSummary, error) + func (c *Client) GetEndpoint(ctx context.Context, id string) (*Endpoint, error) + func (c *Client) GetEndpointSecurity(ctx context.Context, endpointID string) (*EndpointSecurity, error) + func (c *Client) GetRateLimits(ctx context.Context, endpointID string) ([]RateLimit, error) + func (c *Client) ListChains(ctx context.Context) ([]Chain, error) + func (c *Client) ListEndpoints(ctx context.Context, filter EndpointFilter) ([]EndpointSummary, error) + func (c *Client) ListMethodRateLimits(ctx context.Context, endpointID string) ([]MethodRateLimit, error) + func (c *Client) RemoveDomainMask(ctx context.Context, endpointID, domainMaskID string) error + func (c *Client) RemoveEndpointIP(ctx context.Context, endpointID, ipID string) error + func (c *Client) RemoveEndpointTag(ctx context.Context, id string, tagID int64) error + func (c *Client) RemoveEndpointToken(ctx context.Context, endpointID, tokenID string) error + func (c *Client) RemoveJWT(ctx context.Context, endpointID, jwtID string) error + func (c *Client) RemoveMethodRateLimit(ctx context.Context, endpointID, limiterID string) error + func (c *Client) RemoveReferrer(ctx context.Context, endpointID, referrerID string) error + func (c *Client) RemoveRequestFilter(ctx context.Context, endpointID, filterID string) error + func (c *Client) SetEndpointLabel(ctx context.Context, id, label string) error + func (c *Client) SetEndpointMultichain(ctx context.Context, id string, enabled bool) error + func (c *Client) SetEndpointStatus(ctx context.Context, id, status string) error + func (c *Client) SetIPCustomHeader(ctx context.Context, endpointID, headerName string) error + func (c *Client) SetRateLimits(ctx context.Context, endpointID string, overrides RateLimitOverrides) error + func (c *Client) SetSecurityOptions(ctx context.Context, endpointID string, patch SecurityOptionsPatch) error + func (c *Client) UpdateMethodRateLimit(ctx context.Context, endpointID, limiterID string, limiter MethodRateLimit) error + func (c *Client) UpdateRequestFilter(ctx context.Context, endpointID, filterID string, methods []string) error + type Endpoint struct + Chain string + HTTPURLWithToken string + ID string + Label string + Multichain bool + Network string + SafeHTTPURL string + SafeWSSURL string + Security SecurityOptions + Status string + Tags []Tag + Tokens []EndpointToken + WSSURLWithToken string + type EndpointFilter struct + Labels []string + Networks []string + Search string + Statuses []string + TagLabels []string + type EndpointSecurity struct + DomainMasks []SecurityEntry + IPs []SecurityEntry + JWTs []JWT + Options SecurityOptions + Referrers []SecurityEntry + RequestFilters []RequestFilter + Tokens []EndpointToken + type EndpointSummary struct + Chain string + Dedicated bool + FlatRate bool + ID string + Label string + Multichain bool + Name string + Network string + SafeHTTPURL string + SafeWSSURL string + Status string + Tags []Tag + type EndpointToken struct + ID string + Value string + type Error struct + Message string + Operation string + Status int + func (e *Error) Error() string + type JWT struct + ID string + KID string + Name string + PublicKey string + type MethodRateLimit struct + Created string + ID string + Interval string + Methods []string + Rate int + Status string + type Network struct + ChainID *int64 + Name string + Slug string + type Option func(*options) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithMaxRetries(maxRetries int) Option + func WithRequestsPerSecond(requestsPerSecond int) Option + type RateLimit struct + Bucket string + ID string + Source string + Value int + type RateLimitOverrides struct + RPD *int + RPM *int + RPS *int + type RequestFilter struct + ID string + Methods []string + type SecurityEntry struct + ID string + Value string + type SecurityOptions struct + Cors bool + DomainMasks bool + HSTS bool + IPCustomHeader string + IPs bool + JWTs bool + Referrers bool + RequestFilters bool + ResponseLogging bool + Tokens bool + type SecurityOptionsPatch struct + Cors *bool + DomainMasks *bool + HSTS *bool + IPs *bool + JWTs *bool + Referrers *bool + Tokens *bool + type Tag struct + ID int64 + Label string