vedismm

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 20 Imported by: 0

README

VediSMM Go SDK

Official standard-library-first Go client for all 83 operations of the VediSMM user API v1. The module deliberately contains no administrative API.

Русская версия · API documentation · Security policy

Requirements

  • Go 1.22–1.25

Install

go get github.com/VediSMM/sdk-go@v0.1.1

Quick start

package main

import (
	"context"
	"fmt"
	"os"

	vedismm "github.com/VediSMM/sdk-go"
)

func main() {
	sdk, err := vedismm.New(vedismm.WithAccessToken(os.Getenv("VEDISMM_TOKEN")))
	if err != nil {
		panic(err)
	}
	response, err := sdk.Profile.GetMe(context.Background(), vedismm.CallOptions{})
	if err != nil {
		panic(err)
	}
	fmt.Printf("%v\n", response.Data)
}

The facade exposes System, Auth, Profile, Sessions, Audit, PersonalTokens, Preferences, Networks, Connections, Accounts, Groups, Media, Posts, Jobs, Calendar, Analytics, and Webhooks services.

Safety defaults

  • Credentials stay in memory and are omitted from String() and sanitized errors.
  • The SDK clones an injected http.Client and always rejects redirects.
  • Retries are finite and allowed only for safe methods or calls with a stable idempotency key.
  • Request deadlines and cancellation use context.Context; helpers start no goroutines.
  • Response and error bodies are bounded; large uploads/downloads use readers, body factories, and sinks.
  • Problem Details, rate limits, precondition failures, timeouts, cancellation, transport, and decoding remain distinguishable through errors.As.
  • Webhook signatures use HMAC-SHA256 over the original bytes and optional atomic replay protection.

See the English guide and API reference.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIdempotencyKey

func NewIdempotencyKey() (string, error)

NewIdempotencyKey returns a cryptographically random UUID v4.

func OperationOwnership

func OperationOwnership() map[string][]string

OperationOwnership returns a defensive copy of the service-to-operation mapping.

func Operations

func Operations() map[string]Operation

Operations returns a defensive copy of exactly the public user API v1 surface.

func VerifyWebhook

func VerifyWebhook(ctx context.Context, options WebhookVerificationOptions) (bool, error)

VerifyWebhook validates timestamp, HMAC-SHA256, and optional replay protection.

func WaitForJob

func WaitForJob(parent context.Context, fetch JobFetcher, options WaitOptions) (map[string]any, error)

WaitForJob polls without background goroutines until success, terminal failure, cancellation, or timeout.

Types

type APIError

type APIError struct {
	Status           int
	Code             string
	Detail           string
	ValidationErrors any
	RequestID        string
	RetryAfter       time.Duration
}

APIError represents application/problem+json and other unsuccessful statuses.

func (*APIError) Error

func (e *APIError) Error() string

type AccountsService

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

AccountsService exposes the accounts operation group.

func (*AccountsService) DisconnectAccount

func (service *AccountsService) DisconnectAccount(ctx context.Context, options CallOptions) (*Response, error)

DisconnectAccount calls the disconnectAccount operation.

func (*AccountsService) GetAccount

func (service *AccountsService) GetAccount(ctx context.Context, options CallOptions) (*Response, error)

GetAccount calls the getAccount operation.

func (*AccountsService) ListAccounts

func (service *AccountsService) ListAccounts(ctx context.Context, options CallOptions) (*Response, error)

ListAccounts calls the listAccounts operation.

func (*AccountsService) VerifyAccount

func (service *AccountsService) VerifyAccount(ctx context.Context, options CallOptions) (*Response, error)

VerifyAccount calls the verifyAccount operation.

type AnalyticsService

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

AnalyticsService exposes the analytics operation group.

func (*AnalyticsService) GetAnalyticsAudience

func (service *AnalyticsService) GetAnalyticsAudience(ctx context.Context, options CallOptions) (*Response, error)

GetAnalyticsAudience calls the getAnalyticsAudience operation.

func (*AnalyticsService) GetAnalyticsNetworks

func (service *AnalyticsService) GetAnalyticsNetworks(ctx context.Context, options CallOptions) (*Response, error)

GetAnalyticsNetworks calls the getAnalyticsNetworks operation.

func (*AnalyticsService) GetAnalyticsSummary

func (service *AnalyticsService) GetAnalyticsSummary(ctx context.Context, options CallOptions) (*Response, error)

GetAnalyticsSummary calls the getAnalyticsSummary operation.

func (*AnalyticsService) GetAnalyticsTimeseries

func (service *AnalyticsService) GetAnalyticsTimeseries(ctx context.Context, options CallOptions) (*Response, error)

GetAnalyticsTimeseries calls the getAnalyticsTimeseries operation.

func (*AnalyticsService) ListAnalyticsPosts

func (service *AnalyticsService) ListAnalyticsPosts(ctx context.Context, options CallOptions) (*Response, error)

ListAnalyticsPosts calls the listAnalyticsPosts operation.

type AuditService

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

AuditService exposes the audit operation group.

func (*AuditService) ListAuditEvents

func (service *AuditService) ListAuditEvents(ctx context.Context, options CallOptions) (*Response, error)

ListAuditEvents calls the listAuditEvents operation.

type AuthService

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

AuthService exposes the auth operation group.

func (*AuthService) ForgotPassword

func (service *AuthService) ForgotPassword(ctx context.Context, options CallOptions) (*Response, error)

ForgotPassword calls the forgotPassword operation.

func (*AuthService) Login

func (service *AuthService) Login(ctx context.Context, options CallOptions) (*Response, error)

Login calls the login operation.

func (*AuthService) Logout

func (service *AuthService) Logout(ctx context.Context, options CallOptions) (*Response, error)

Logout calls the logout operation.

func (*AuthService) LogoutAll

func (service *AuthService) LogoutAll(ctx context.Context, options CallOptions) (*Response, error)

LogoutAll calls the logoutAll operation.

func (*AuthService) Refresh

func (service *AuthService) Refresh(ctx context.Context, options CallOptions) (*Response, error)

Refresh calls the refresh operation.

func (*AuthService) Register

func (service *AuthService) Register(ctx context.Context, options CallOptions) (*Response, error)

Register calls the register operation.

func (*AuthService) ResendVerification

func (service *AuthService) ResendVerification(ctx context.Context, options CallOptions) (*Response, error)

ResendVerification calls the resendVerification operation.

func (*AuthService) ResetPassword

func (service *AuthService) ResetPassword(ctx context.Context, options CallOptions) (*Response, error)

ResetPassword calls the resetPassword operation.

func (*AuthService) VerifyEmail

func (service *AuthService) VerifyEmail(ctx context.Context, options CallOptions) (*Response, error)

VerifyEmail calls the verifyEmail operation.

type CalendarService

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

CalendarService exposes the calendar operation group.

func (*CalendarService) ListCalendarEvents

func (service *CalendarService) ListCalendarEvents(ctx context.Context, options CallOptions) (*Response, error)

ListCalendarEvents calls the listCalendarEvents operation.

type CallOptions

type CallOptions struct {
	Path           map[string]string
	Query          url.Values
	Body           any
	RawBody        io.Reader
	BodyFactory    func() (io.ReadCloser, error)
	ContentType    string
	Headers        http.Header
	IdempotencyKey string
	IfMatch        string
	Timeout        time.Duration
	Sink           io.Writer
}

CallOptions customizes one API call. Path and query values are encoded by the SDK.

type CancelledError

type CancelledError struct {
	Message string
	Cause   error
}

CancelledError reports caller-initiated context cancellation.

func (*CancelledError) Error

func (e *CancelledError) Error() string

func (*CancelledError) Unwrap

func (e *CancelledError) Unwrap() error

type Client

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

Client is safe for concurrent use when its injected HTTP client and token provider are safe.

func NewClient

func NewClient(options ...ClientOption) (*Client, error)

NewClient creates a secure VediSMM user API client.

func (*Client) Call

func (client *Client) Call(parent context.Context, operationID string, options CallOptions) (*Response, error)

Call executes one canonical operation.

func (*Client) String

func (client *Client) String() string

type ClientOption

type ClientOption func(*clientConfig) error

ClientOption validates and changes one client setting.

func WithAccessToken

func WithAccessToken(token string) ClientOption

WithAccessToken uses a fixed in-memory Bearer token.

func WithBaseURL

func WithBaseURL(value string) ClientOption

func WithHTTPClient

func WithHTTPClient(value *http.Client) ClientOption

func WithMaxRetries

func WithMaxRetries(value int) ClientOption

func WithRandom

func WithRandom(value func() float64) ClientOption

func WithResponseLimits

func WithResponseLimits(successBytes, errorBytes int64) ClientOption

func WithRetryBaseDelay

func WithRetryBaseDelay(value time.Duration) ClientOption

func WithSleeper

func WithSleeper(value func(context.Context, time.Duration) error) ClientOption

func WithTimeout

func WithTimeout(value time.Duration) ClientOption

func WithTokenProvider

func WithTokenProvider(provider TokenProvider) ClientOption

WithTokenProvider resolves a token immediately before each authenticated request.

type ConfigurationError

type ConfigurationError struct{ Message string }

ConfigurationError reports invalid client or call configuration before I/O.

func (*ConfigurationError) Error

func (e *ConfigurationError) Error() string

type ConnectionsService

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

ConnectionsService exposes the connections operation group.

func (*ConnectionsService) CancelAccountConnection

func (service *ConnectionsService) CancelAccountConnection(ctx context.Context, options CallOptions) (*Response, error)

CancelAccountConnection calls the cancelAccountConnection operation.

func (*ConnectionsService) ConfirmAccountConnection

func (service *ConnectionsService) ConfirmAccountConnection(ctx context.Context, options CallOptions) (*Response, error)

ConfirmAccountConnection calls the confirmAccountConnection operation.

func (*ConnectionsService) GetAccountConnection

func (service *ConnectionsService) GetAccountConnection(ctx context.Context, options CallOptions) (*Response, error)

GetAccountConnection calls the getAccountConnection operation.

func (*ConnectionsService) StartAccountConnection

func (service *ConnectionsService) StartAccountConnection(ctx context.Context, options CallOptions) (*Response, error)

StartAccountConnection calls the startAccountConnection operation.

type DecodeError

type DecodeError struct {
	Message   string
	RequestID string
	Cause     error
}

DecodeError reports an invalid or over-limit successful response.

func (*DecodeError) Error

func (e *DecodeError) Error() string

func (*DecodeError) Unwrap

func (e *DecodeError) Unwrap() error

type GroupsService

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

GroupsService exposes the groups operation group.

func (*GroupsService) CreateGroup

func (service *GroupsService) CreateGroup(ctx context.Context, options CallOptions) (*Response, error)

CreateGroup calls the createGroup operation.

func (*GroupsService) DeleteGroup

func (service *GroupsService) DeleteGroup(ctx context.Context, options CallOptions) (*Response, error)

DeleteGroup calls the deleteGroup operation.

func (*GroupsService) GetGroup

func (service *GroupsService) GetGroup(ctx context.Context, options CallOptions) (*Response, error)

GetGroup calls the getGroup operation.

func (*GroupsService) ListGroups

func (service *GroupsService) ListGroups(ctx context.Context, options CallOptions) (*Response, error)

ListGroups calls the listGroups operation.

func (*GroupsService) ReplaceGroupAccounts

func (service *GroupsService) ReplaceGroupAccounts(ctx context.Context, options CallOptions) (*Response, error)

ReplaceGroupAccounts calls the replaceGroupAccounts operation.

func (*GroupsService) UpdateGroup

func (service *GroupsService) UpdateGroup(ctx context.Context, options CallOptions) (*Response, error)

UpdateGroup calls the updateGroup operation.

type JobFailedError

type JobFailedError struct{ Job map[string]any }

JobFailedError reports a terminal failed or cancelled publication job.

func (*JobFailedError) Error

func (e *JobFailedError) Error() string

type JobFetcher

type JobFetcher func(context.Context) (map[string]any, error)

JobFetcher reads the current public job representation.

type JobsService

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

JobsService exposes the jobs operation group.

func (*JobsService) DeletePostEverywhere

func (service *JobsService) DeletePostEverywhere(ctx context.Context, options CallOptions) (*Response, error)

DeletePostEverywhere calls the deletePostEverywhere operation.

func (*JobsService) GetPublicationJob

func (service *JobsService) GetPublicationJob(ctx context.Context, options CallOptions) (*Response, error)

GetPublicationJob calls the getPublicationJob operation.

func (*JobsService) ListPublicationJobs

func (service *JobsService) ListPublicationJobs(ctx context.Context, options CallOptions) (*Response, error)

ListPublicationJobs calls the listPublicationJobs operation.

func (*JobsService) PublishPost

func (service *JobsService) PublishPost(ctx context.Context, options CallOptions) (*Response, error)

PublishPost calls the publishPost operation.

func (*JobsService) RetryPostTargets

func (service *JobsService) RetryPostTargets(ctx context.Context, options CallOptions) (*Response, error)

RetryPostTargets calls the retryPostTargets operation.

type MediaService

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

MediaService exposes the media operation group.

func (*MediaService) DeleteMedia

func (service *MediaService) DeleteMedia(ctx context.Context, options CallOptions) (*Response, error)

DeleteMedia calls the deleteMedia operation.

func (*MediaService) GetMedia

func (service *MediaService) GetMedia(ctx context.Context, options CallOptions) (*Response, error)

GetMedia calls the getMedia operation.

func (*MediaService) GetMediaContent

func (service *MediaService) GetMediaContent(ctx context.Context, options CallOptions) (*Response, error)

GetMediaContent calls the getMediaContent operation.

func (*MediaService) GetSignedMediaContent

func (service *MediaService) GetSignedMediaContent(ctx context.Context, options CallOptions) (*Response, error)

GetSignedMediaContent calls the getSignedMediaContent operation.

func (*MediaService) ListMedia

func (service *MediaService) ListMedia(ctx context.Context, options CallOptions) (*Response, error)

ListMedia calls the listMedia operation.

func (*MediaService) UploadMedia

func (service *MediaService) UploadMedia(ctx context.Context, options CallOptions) (*Response, error)

UploadMedia calls the uploadMedia operation.

type MemoryReplayStore

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

MemoryReplayStore is concurrency-safe and intended for tests or single-process applications.

func NewMemoryReplayStore

func NewMemoryReplayStore(now func() time.Time) *MemoryReplayStore

NewMemoryReplayStore creates a replay store with an injectable clock.

func (*MemoryReplayStore) Claim

func (store *MemoryReplayStore) Claim(ctx context.Context, eventID string, expiresAt time.Time) (bool, error)

Claim atomically accepts a new event and rejects a duplicate.

type NetworksService

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

NetworksService exposes the networks operation group.

func (*NetworksService) GetNetwork

func (service *NetworksService) GetNetwork(ctx context.Context, options CallOptions) (*Response, error)

GetNetwork calls the getNetwork operation.

func (*NetworksService) ListNetworks

func (service *NetworksService) ListNetworks(ctx context.Context, options CallOptions) (*Response, error)

ListNetworks calls the listNetworks operation.

type Operation

type Operation struct {
	Method              string
	Path                string
	Tag                 string
	Authenticated       bool
	Scopes              []string
	RequestContentTypes []string
	ResponseStatuses    []string
	Capabilities        []string
}

Operation describes one canonical VediSMM user API operation.

type Page

type Page[T any] struct {
	Data       []T
	NextCursor *string
}

Page is one decoded cursor page. NextCursor is opaque and must not be constructed by callers.

type PageFetcher

type PageFetcher[T any] func(context.Context, *string) (Page[T], error)

PageFetcher obtains one page for an opaque cursor.

type Pager

type Pager[T any] struct {
	// contains filtered or unexported fields
}

Pager is a pull-based, context-aware iterator. It starts no goroutines.

func NewPager

func NewPager[T any](fetch PageFetcher[T], initialCursor *string) *Pager[T]

NewPager creates a lazy pager. The initial cursor is copied.

func (*Pager[T]) Next

func (pager *Pager[T]) Next(ctx context.Context) (T, bool, error)

Next returns an item, false at the end, or an error.

type PaginationError

type PaginationError struct{ Message string }

PaginationError reports malformed or cyclic cursor behavior.

func (*PaginationError) Error

func (e *PaginationError) Error() string

type PersonalTokensService

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

PersonalTokensService exposes the personalTokens operation group.

func (*PersonalTokensService) CreatePersonalToken

func (service *PersonalTokensService) CreatePersonalToken(ctx context.Context, options CallOptions) (*Response, error)

CreatePersonalToken calls the createPersonalToken operation.

func (*PersonalTokensService) GetPersonalToken

func (service *PersonalTokensService) GetPersonalToken(ctx context.Context, options CallOptions) (*Response, error)

GetPersonalToken calls the getPersonalToken operation.

func (*PersonalTokensService) ListPersonalTokens

func (service *PersonalTokensService) ListPersonalTokens(ctx context.Context, options CallOptions) (*Response, error)

ListPersonalTokens calls the listPersonalTokens operation.

func (*PersonalTokensService) RevokePersonalToken

func (service *PersonalTokensService) RevokePersonalToken(ctx context.Context, options CallOptions) (*Response, error)

RevokePersonalToken calls the revokePersonalToken operation.

func (*PersonalTokensService) RotatePersonalToken

func (service *PersonalTokensService) RotatePersonalToken(ctx context.Context, options CallOptions) (*Response, error)

RotatePersonalToken calls the rotatePersonalToken operation.

func (*PersonalTokensService) UpdatePersonalToken

func (service *PersonalTokensService) UpdatePersonalToken(ctx context.Context, options CallOptions) (*Response, error)

UpdatePersonalToken calls the updatePersonalToken operation.

type PostsService

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

PostsService exposes the posts operation group.

func (*PostsService) CheckPostConstraints

func (service *PostsService) CheckPostConstraints(ctx context.Context, options CallOptions) (*Response, error)

CheckPostConstraints calls the checkPostConstraints operation.

func (*PostsService) CreatePostDraft

func (service *PostsService) CreatePostDraft(ctx context.Context, options CallOptions) (*Response, error)

CreatePostDraft calls the createPostDraft operation.

func (*PostsService) DeletePostDraft

func (service *PostsService) DeletePostDraft(ctx context.Context, options CallOptions) (*Response, error)

DeletePostDraft calls the deletePostDraft operation.

func (*PostsService) GetPost

func (service *PostsService) GetPost(ctx context.Context, options CallOptions) (*Response, error)

GetPost calls the getPost operation.

func (*PostsService) ListPosts

func (service *PostsService) ListPosts(ctx context.Context, options CallOptions) (*Response, error)

ListPosts calls the listPosts operation.

func (*PostsService) SchedulePost

func (service *PostsService) SchedulePost(ctx context.Context, options CallOptions) (*Response, error)

SchedulePost calls the schedulePost operation.

func (*PostsService) UnschedulePost

func (service *PostsService) UnschedulePost(ctx context.Context, options CallOptions) (*Response, error)

UnschedulePost calls the unschedulePost operation.

func (*PostsService) UpdatePostDraft

func (service *PostsService) UpdatePostDraft(ctx context.Context, options CallOptions) (*Response, error)

UpdatePostDraft calls the updatePostDraft operation.

type PreconditionFailedError

type PreconditionFailedError struct{ *APIError }

PreconditionFailedError identifies HTTP 412 optimistic-concurrency failures.

type PreferencesService

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

PreferencesService exposes the preferences operation group.

func (*PreferencesService) CreateContentTemplate

func (service *PreferencesService) CreateContentTemplate(ctx context.Context, options CallOptions) (*Response, error)

CreateContentTemplate calls the createContentTemplate operation.

func (*PreferencesService) DeleteContentTemplate

func (service *PreferencesService) DeleteContentTemplate(ctx context.Context, options CallOptions) (*Response, error)

DeleteContentTemplate calls the deleteContentTemplate operation.

func (*PreferencesService) GetContentTemplate

func (service *PreferencesService) GetContentTemplate(ctx context.Context, options CallOptions) (*Response, error)

GetContentTemplate calls the getContentTemplate operation.

func (*PreferencesService) GetSignatures

func (service *PreferencesService) GetSignatures(ctx context.Context, options CallOptions) (*Response, error)

GetSignatures calls the getSignatures operation.

func (*PreferencesService) ListContentTemplates

func (service *PreferencesService) ListContentTemplates(ctx context.Context, options CallOptions) (*Response, error)

ListContentTemplates calls the listContentTemplates operation.

func (*PreferencesService) ReplaceSignatures

func (service *PreferencesService) ReplaceSignatures(ctx context.Context, options CallOptions) (*Response, error)

ReplaceSignatures calls the replaceSignatures operation.

func (*PreferencesService) UpdateContentTemplate

func (service *PreferencesService) UpdateContentTemplate(ctx context.Context, options CallOptions) (*Response, error)

UpdateContentTemplate calls the updateContentTemplate operation.

type ProfileService

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

ProfileService exposes the profile operation group.

func (*ProfileService) ChangePassword

func (service *ProfileService) ChangePassword(ctx context.Context, options CallOptions) (*Response, error)

ChangePassword calls the changePassword operation.

func (*ProfileService) DeleteMe

func (service *ProfileService) DeleteMe(ctx context.Context, options CallOptions) (*Response, error)

DeleteMe calls the deleteMe operation.

func (*ProfileService) GetMe

func (service *ProfileService) GetMe(ctx context.Context, options CallOptions) (*Response, error)

GetMe calls the getMe operation.

func (*ProfileService) UpdateMe

func (service *ProfileService) UpdateMe(ctx context.Context, options CallOptions) (*Response, error)

UpdateMe calls the updateMe operation.

type RateLimitError

type RateLimitError struct{ *APIError }

RateLimitError identifies HTTP 429.

type RedirectError

type RedirectError struct {
	Status    int
	RequestID string
}

RedirectError reports a rejected redirect. Authenticated redirects are never followed.

func (*RedirectError) Error

func (e *RedirectError) Error() string

type ReplayStore

type ReplayStore interface {
	Claim(context.Context, string, time.Time) (bool, error)
}

ReplayStore atomically claims an event ID until an expiry time.

type Response

type Response struct {
	StatusCode int
	Headers    http.Header
	Data       any
	RequestID  string
	ETag       string
}

Response contains transport metadata and decoded JSON, []byte, or nil data.

type SDK

type SDK struct {
	Client         *Client
	System         *SystemService
	Auth           *AuthService
	Profile        *ProfileService
	Sessions       *SessionsService
	Audit          *AuditService
	PersonalTokens *PersonalTokensService
	Preferences    *PreferencesService
	Networks       *NetworksService
	Connections    *ConnectionsService
	Accounts       *AccountsService
	Groups         *GroupsService
	Media          *MediaService
	Posts          *PostsService
	Jobs           *JobsService
	Calendar       *CalendarService
	Analytics      *AnalyticsService
	Webhooks       *WebhooksService
}

SDK groups all user API operations into native domain services.

func New

func New(options ...ClientOption) (*SDK, error)

New creates an SDK facade and its secure client.

func NewWithClient

func NewWithClient(client *Client) *SDK

NewWithClient creates the service facade around an existing client. It panics for a nil client because that is a programmer error.

type SessionsService

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

SessionsService exposes the sessions operation group.

func (*SessionsService) GetSession

func (service *SessionsService) GetSession(ctx context.Context, options CallOptions) (*Response, error)

GetSession calls the getSession operation.

func (*SessionsService) ListSessions

func (service *SessionsService) ListSessions(ctx context.Context, options CallOptions) (*Response, error)

ListSessions calls the listSessions operation.

func (*SessionsService) RevokeSession

func (service *SessionsService) RevokeSession(ctx context.Context, options CallOptions) (*Response, error)

RevokeSession calls the revokeSession operation.

type SystemService

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

SystemService exposes the system operation group.

func (*SystemService) GetOpenAPI

func (service *SystemService) GetOpenAPI(ctx context.Context, options CallOptions) (*Response, error)

GetOpenAPI calls the getOpenApi operation.

func (*SystemService) Ping

func (service *SystemService) Ping(ctx context.Context, options CallOptions) (*Response, error)

Ping calls the ping operation.

type TimeoutError

type TimeoutError struct {
	Message string
	Cause   error
}

TimeoutError is distinct from cancellation and other transport failures.

func (*TimeoutError) Error

func (e *TimeoutError) Error() string

func (*TimeoutError) Unwrap

func (e *TimeoutError) Unwrap() error

type TokenProvider

type TokenProvider func(context.Context) (string, error)

TokenProvider returns the credential for the current request.

type TransportError

type TransportError struct {
	Message string
	Cause   error
}

TransportError reports a network or HTTP transport failure.

func (*TransportError) Error

func (e *TransportError) Error() string

func (*TransportError) Unwrap

func (e *TransportError) Unwrap() error

type WaitOptions

type WaitOptions struct {
	Timeout      time.Duration
	PollInterval time.Duration
	Sleeper      func(context.Context, time.Duration) error
	Now          func() time.Time
}

WaitOptions controls finite publication-job polling.

type WebhookVerificationOptions

type WebhookVerificationOptions struct {
	Secret      string
	Timestamp   string
	Signature   string
	Body        []byte
	Tolerance   time.Duration
	Now         time.Time
	EventID     string
	ReplayStore ReplayStore
}

WebhookVerificationOptions contains the original webhook bytes and signed headers.

type WebhooksService

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

WebhooksService exposes the webhooks operation group.

func (*WebhooksService) CreateWebhook

func (service *WebhooksService) CreateWebhook(ctx context.Context, options CallOptions) (*Response, error)

CreateWebhook calls the createWebhook operation.

func (*WebhooksService) DeleteWebhook

func (service *WebhooksService) DeleteWebhook(ctx context.Context, options CallOptions) (*Response, error)

DeleteWebhook calls the deleteWebhook operation.

func (*WebhooksService) GetWebhook

func (service *WebhooksService) GetWebhook(ctx context.Context, options CallOptions) (*Response, error)

GetWebhook calls the getWebhook operation.

func (*WebhooksService) GetWebhookDelivery

func (service *WebhooksService) GetWebhookDelivery(ctx context.Context, options CallOptions) (*Response, error)

GetWebhookDelivery calls the getWebhookDelivery operation.

func (*WebhooksService) ListWebhookDeliveries

func (service *WebhooksService) ListWebhookDeliveries(ctx context.Context, options CallOptions) (*Response, error)

ListWebhookDeliveries calls the listWebhookDeliveries operation.

func (*WebhooksService) ListWebhooks

func (service *WebhooksService) ListWebhooks(ctx context.Context, options CallOptions) (*Response, error)

ListWebhooks calls the listWebhooks operation.

func (*WebhooksService) RetryWebhookDelivery

func (service *WebhooksService) RetryWebhookDelivery(ctx context.Context, options CallOptions) (*Response, error)

RetryWebhookDelivery calls the retryWebhookDelivery operation.

func (*WebhooksService) RotateWebhookSecret

func (service *WebhooksService) RotateWebhookSecret(ctx context.Context, options CallOptions) (*Response, error)

RotateWebhookSecret calls the rotateWebhookSecret operation.

func (*WebhooksService) TestWebhook

func (service *WebhooksService) TestWebhook(ctx context.Context, options CallOptions) (*Response, error)

TestWebhook calls the testWebhook operation.

func (*WebhooksService) UpdateWebhook

func (service *WebhooksService) UpdateWebhook(ctx context.Context, options CallOptions) (*Response, error)

UpdateWebhook calls the updateWebhook operation.

Directories

Path Synopsis
examples
quickstart command
internal
cmd/checkdocs command

Jump to

Keyboard shortcuts

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