domain

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeInvalidInput         = "INVALID_INPUT"
	CodeNotFound             = "NOT_FOUND"
	CodeAccessRestricted     = "ACCESS_RESTRICTED"
	CodeRateLimited          = "RATE_LIMITED"
	CodeNetworkFailure       = "NETWORK_FAILURE"
	CodeTimeout              = "TIMEOUT"
	CodeUnsupportedOperation = "UNSUPPORTED_OPERATION"
	CodeUpstreamChanged      = "UPSTREAM_CHANGED"
	CodeInternalError        = "INTERNAL_ERROR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Completeness

type Completeness string
const (
	CompletenessComplete Completeness = "complete"
	CompletenessPartial  Completeness = "partial"
	CompletenessUnknown  Completeness = "unknown"
)

type Page

type Page[T any] struct {
	Items          []T          `json:"items"`
	ReturnedCount  int          `json:"returned_count"`
	RequestedLimit int          `json:"requested_limit"`
	Completeness   Completeness `json:"completeness"`
	Warnings       []string     `json:"warnings"`
}

type Post

type Post struct {
	ID           string   `json:"id"`
	Shortcode    *string  `json:"shortcode,omitempty"`
	Text         *string  `json:"text,omitempty"`
	Username     *string  `json:"username,omitempty"`
	UserID       *string  `json:"user_id,omitempty"`
	Permalink    *string  `json:"permalink,omitempty"`
	Timestamp    *string  `json:"timestamp,omitempty"`
	MediaType    *string  `json:"media_type,omitempty"`
	MediaURLs    []string `json:"media_urls,omitempty"`
	LikeCount    *int64   `json:"like_count,omitempty"`
	ReplyCount   *int64   `json:"reply_count,omitempty"`
	RepostCount  *int64   `json:"repost_count,omitempty"`
	QuoteCount   *int64   `json:"quote_count,omitempty"`
	IsReply      *bool    `json:"is_reply,omitempty"`
	IsQuotePost  *bool    `json:"is_quote_post,omitempty"`
	ReplyToID    *string  `json:"reply_to_id,omitempty"`
	QuotedPostID *string  `json:"quoted_post_id,omitempty"`
}

type Profile

type Profile struct {
	ID             string  `json:"id"`
	Username       string  `json:"username"`
	Name           *string `json:"name,omitempty"`
	Biography      *string `json:"biography,omitempty"`
	ProfilePicURL  *string `json:"profile_pic_url,omitempty"`
	IsVerified     *bool   `json:"is_verified,omitempty"`
	FollowerCount  *int64  `json:"follower_count,omitempty"`
	FollowingCount *int64  `json:"following_count,omitempty"`
	URL            string  `json:"url"`
}

type ProviderError

type ProviderError struct {
	Code              string
	Message           string
	Retryable         bool
	RetryAfterSeconds *int
	Cause             error
}

func (*ProviderError) Error

func (e *ProviderError) Error() string

func (*ProviderError) Unwrap

func (e *ProviderError) Unwrap() error

type Reply

type Reply struct {
	Post
	ParentID *string `json:"parent_id,omitempty"`
	RootID   *string `json:"root_id,omitempty"`
}

Jump to

Keyboard shortcuts

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