Documentation ¶
Index ¶
- type AuthResponse
- type BlobRecord
- type BlobRef
- type CommitEvent
- type CommitEventType
- type CreateRecordParams
- type DIDDoc
- type DIDService
- type DIDVerificationMethod
- type EmbedImageRecord
- type EmbedRecord
- type ImageAspectRatio
- type ImageRecord
- type LikeRecord
- type Post
- type PostAuthor
- type PostRecord
- type PostResponse
- type PostViewer
- type Posts
- type Record
- type Reply
- type RepoCommitEvent
- type RepoOperation
- type RepoStrongRef
- type RepostRecord
- type RequestLikesFromPost
- type RequestRecord
- type RequestRecordBody
- type SessionRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthResponse struct { DID string `json:"did"` DIDDoc DIDDoc `json:"didDoc"` Handle string `json:"handle"` Email string `json:"email"` EmailConfirmed bool `json:"emailConfirmed"` EmailAuthFactor bool `json:"emailAuthFactor"` AccessJwt string `json:"accessJwt"` RefreshJwt string `json:"refreshJwt"` Active bool `json:"active"` }
type BlobRecord ¶ added in v0.4.0
type CommitEvent ¶
type CommitEvent interface { Type() CommitEventType GetRepo() string GetOps() []RepoOperation GetBlocks() []byte }
type CommitEventType ¶
type CommitEventType string
const (
CommitEventTypeRepoCommit CommitEventType = "repo_commit"
)
type CreateRecordParams ¶
type DIDDoc ¶
type DIDDoc struct { Context []string `json:"@context"` ID string `json:"id"` AlsoKnownAs []string `json:"alsoKnownAs"` VerificationMethod []DIDVerificationMethod `json:"verificationMethod"` Service []DIDService `json:"service"` }
type DIDService ¶
type DIDVerificationMethod ¶
type EmbedImageRecord ¶ added in v0.4.0
type EmbedImageRecord struct { LexiconTypeID string `json:"$type"` Images []ImageRecord `json:"images"` }
type EmbedRecord ¶ added in v0.4.0
type ImageAspectRatio ¶ added in v0.4.0
type ImageRecord ¶ added in v0.4.0
type ImageRecord struct { Alt string `json:"alt"` AspectRatio ImageAspectRatio `json:"aspectRatio"` Image BlobRecord `json:"image"` }
type LikeRecord ¶ added in v0.4.0
type LikeRecord struct { LexiconTypeID string `json:"$type"` Subject RepoStrongRef `json:"subject"` CreatedAt time.Time `json:"createdAt"` }
type Post ¶
type Post struct { LexiconTypeID string `json:"$type"` URI string `json:"uri"` // at-uri CID any `json:"cid"` // TODO: for now handle CID like the the firehose, but need improvement Author PostAuthor `json:"author"` Record PostRecord `json:"record"` Embed any `json:"embed"` // TODO: embed can be many types of objects, for now it will be any, need improvement ReplyCount int `json:"replyCount,omitempty"` RepostCount int `json:"repostCount,omitempty"` LikeCount int `json:"likeCount,omitempty"` QuoteCount int `json:"quoteCount,omitempty"` IndexedAt time.Time `json:"indexedAt"` Viewer PostViewer `json:"viewer"` }
Post
Represents the struct with data when requesting the get posts endpoint
type PostAuthor ¶
type PostAuthor struct { DID string `json:"did"` Handle string `json:"handle"` DisplayName string `json:"displayName"` Avatar string `json:"avatar"` CreatedAt time.Time `json:"createdAt"` }
PostAuthor
TODO: add remaining fields associated,viewer and labels
type PostRecord ¶
type PostRecord struct { LexiconTypeID string `json:"$type"` URI string `json:"uri"` CreatedAt time.Time `json:"createdAt"` Embed any `json:"embed"` // TODO: embed can be many types of objects, for now it will be any, need improvement Facets []map[string]any `json:"facets,omitempty"` Langs []string `json:"langs"` Reply *Reply `json:"reply,omitempty"` Text string `json:"text"` }
PostRecord
Represents the post record data.
type PostResponse ¶ added in v0.2.0
type PostResponse struct {
Posts Posts `json:"posts"`
}
type PostViewer ¶
type PostViewer struct { Repost string `json:"repost"` // at-uri Like string `json:"like"` // at-uri ThreadMuted bool `json:"threadMuted"` ReplyDisabled bool `json:"replyDisabled"` EmbeddingDisabled bool `json:"embeddingDisabled"` Pinned bool `json:"pinned"` }
PostViewer
Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
type Reply ¶
type Reply struct { Parent RepoStrongRef `json:"parent"` Root RepoStrongRef `json:"root"` }
type RepoCommitEvent ¶
type RepoCommitEvent struct { Repo string `cbor:"repo"` Rev string `cbor:"rev"` Seq int64 `cbor:"seq"` Since string `cbor:"since"` Time string `cbor:"time"` TooBig bool `cbor:"tooBig"` Prev any `cbor:"prev"` Rebase bool `cbor:"rebase"` Blocks []byte `cbor:"blocks"` Ops []RepoOperation `cbor:"ops"` Commit any `json:"commit"` // Repo commit object CID }
func (RepoCommitEvent) GetBlocks ¶ added in v0.2.0
func (e RepoCommitEvent) GetBlocks() []byte
func (RepoCommitEvent) GetOps ¶ added in v0.2.0
func (e RepoCommitEvent) GetOps() []RepoOperation
func (RepoCommitEvent) GetRepo ¶ added in v0.3.0
func (e RepoCommitEvent) GetRepo() string
func (RepoCommitEvent) Type ¶
func (e RepoCommitEvent) Type() CommitEventType
type RepoOperation ¶
type RepoStrongRef ¶
type RepostRecord ¶ added in v0.4.0
type RepostRecord struct { LexiconTypeID string `json:"$type"` Subject RepoStrongRef `json:"subject"` CreatedAt time.Time `json:"createdAt"` }
type RequestLikesFromPost ¶
type RequestLikesFromPost struct {
URI string `json:"uri"`
}
type RequestRecord ¶
type RequestRecord struct { Subject RepoStrongRef `json:"subject"` Text string `json:"text,omitempty"` CreatedAt time.Time `json:"createdAt"` }
type RequestRecordBody ¶
type RequestRecordBody struct { LexiconTypeID string `json:"$type"` Collection string `json:"collection"` Repo string `json:"repo"` Record RequestRecord `json:"record"` }
type SessionRequest ¶
Click to show internal directories.
Click to hide internal directories.