Versions in this module Expand all Collapse all v0 v0.1.1 Jul 23, 2026 v0.1.0 Jul 23, 2026 Changes in this version + const DefaultWebhookTolerance + const EnvToken + const Version + func Bool(v bool) *bool + func Int(v int) *int + func Int64(v int64) *int64 + func String(v string) *string + func Time(v time.Time) *time.Time + type AccessError struct + Required string + func (e *AccessError) Unwrap() error + type AccountService struct + func (s *AccountService) Usage(ctx context.Context) (*Usage, error) + type Analytics struct + Browsers []AnalyticsCount + Countries []AnalyticsCount + Devices []AnalyticsCount + Range AnalyticsRange + Referrers []AnalyticsCount + Series []AnalyticsPoint + Totals AnalyticsTotals + type AnalyticsCount struct + Clicks int64 + Value string + type AnalyticsOptions struct + From string + To string + type AnalyticsPoint struct + Clicks int64 + Date string + Uniques int64 + type AnalyticsRange struct + From string + To string + type AnalyticsTotals struct + BotClicks int64 + Clicks int64 + Uniques int64 + type AuthenticationError struct + func (e *AuthenticationError) Unwrap() error + type BulkCreateFailure struct + Error string + Index int + type BulkCreateResult struct + Created []Link + Failed []BulkCreateFailure + type Client struct + Account *AccountService + Folders *FoldersService + Links *LinksService + Tags *TagsService + Webhooks *WebhooksService + func NewClient(opts ...Option) *Client + func (c *Client) Shorten(ctx context.Context, longURL string) (*ShortenResult, error) + type CreateLinkParams struct + ClickLimit int + Description string + DestinationURL string + ExpiresAt *time.Time + FallbackURL string + FolderID int64 + Notes string + Password string + RedirectType int + Slug string + Tags []string + Title string + UTM *UTM + type EntitlementError struct + func (e *EntitlementError) Unwrap() error + type Error struct + Body []byte + Message string + StatusCode int + Type string + func (e *Error) Error() string + type Event struct + CreatedAt time.Time + Data json.RawMessage + Event string + ID string + func (e *Event) Link() (*Link, error) + type Folder struct + Color string + CreatedAt time.Time + ID int64 + LinksCount int + Name string + Position int + type FoldersService struct + func (s *FoldersService) List(ctx context.Context) ([]Folder, error) + type Link struct + ClickLimit *int + CreatedAt time.Time + Description *string + DestinationURL string + ExpiresAt *time.Time + FolderID *int64 + HasPassword bool + ID int64 + LastClickedAt *time.Time + RedirectType int + ShortURL string + Slug string + Status string + Tags []string + Title *string + TotalClicks int64 + UniqueClicks int64 + UpdatedAt time.Time + type LinkPage struct + Data []Link + Links PageLinks + Meta Meta + func (p *LinkPage) HasNext() bool + type LinksService struct + func (s *LinksService) Analytics(ctx context.Context, id int64, opts *AnalyticsOptions) (*Analytics, error) + func (s *LinksService) BulkCreate(ctx context.Context, links []CreateLinkParams) (*BulkCreateResult, error) + func (s *LinksService) Create(ctx context.Context, params CreateLinkParams) (*Link, error) + func (s *LinksService) Delete(ctx context.Context, id int64) error + func (s *LinksService) Disable(ctx context.Context, id int64) (*Link, error) + func (s *LinksService) Enable(ctx context.Context, id int64) (*Link, error) + func (s *LinksService) Get(ctx context.Context, id int64) (*Link, error) + func (s *LinksService) Iter(ctx context.Context, opts *ListOptions) iter.Seq2[Link, error] + func (s *LinksService) List(ctx context.Context, opts *ListOptions) (*LinkPage, error) + func (s *LinksService) QR(ctx context.Context, id int64, opts *QROptions) (*QRCode, error) + func (s *LinksService) Update(ctx context.Context, id int64, params UpdateLinkParams) (*Link, error) + type ListOptions struct + FolderID int64 + Page int + PerPage int + Search string + Status string + Tag string + type Meta struct + CurrentPage int + From int + LastPage int + PerPage int + To int + Total int + type NotFoundError struct + func (e *NotFoundError) Unwrap() error + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(hc *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + func WithToken(token string) Option + type PageLinks struct + First *string + Last *string + Next *string + Prev *string + type QRCode struct + ContentType string + Data []byte + type QROptions struct + Format string + Size int + type RateLimitError struct + RetryAfter int + func (e *RateLimitError) Unwrap() error + type ServerError struct + func (e *ServerError) Unwrap() error + type ShortenResult struct + ClaimURL string + Docs string + Expires string + PreviewURL string + QRURL string + ShortURL string + Slug string + func Shorten(ctx context.Context, longURL string) (*ShortenResult, error) + type SignatureVerificationError struct + Message string + func (e *SignatureVerificationError) Error() string + type StateConflictError struct + Current string + func (e *StateConflictError) Unwrap() error + type Tag struct + CreatedAt time.Time + ID int64 + LinksCount int + Name string + type TagsService struct + func (s *TagsService) List(ctx context.Context) ([]Tag, error) + type UTM struct + Campaign string + Content string + Medium string + Source string + Term string + type UpdateLinkParams struct + ClickLimit *int + Description *string + DestinationURL *string + ExpiresAt *time.Time + FallbackURL *string + FolderID *int64 + Notes *string + Password *string + RedirectType *int + Slug *string + Tags []string + Title *string + UTM *UTM + type Usage struct + Limits UsageLimits + PeriodStart string + Plan string + Usage UsageCounters + type UsageCounters struct + APIRequests int64 + HumanClicks int64 + LinksCreated int64 + type UsageLimits struct + APIRequestsPerMinute int64 + HumanClicksPerMonth int64 + LinksPerMonth int64 + type ValidationError struct + Errors map[string][]string + func (e *ValidationError) Unwrap() error + type WebhooksService struct + func (s *WebhooksService) ConstructEvent(payload []byte, signatureHeader, secret string, tolerance time.Duration) (*Event, error) + func (s *WebhooksService) Verify(payload []byte, signatureHeader, secret string, tolerance time.Duration) (*Event, error)