Documentation
¶
Index ¶
- type AchievementGranter
- type ConversationRequest
- type CreateRequest
- type DeleteRequest
- type FeaturedRankingCache
- type FeaturedRankingReader
- type Handler
- func (h *Handler) BulkShow(c *echo.Context) error
- func (h *Handler) Children(c *echo.Context) error
- func (h *Handler) Clips(c *echo.Context) error
- func (h *Handler) Conversation(c *echo.Context) error
- func (h *Handler) Create(c *echo.Context) error
- func (h *Handler) Delete(c *echo.Context) error
- func (h *Handler) DraftsCount(c *echo.Context) error
- func (h *Handler) DraftsCreate(c *echo.Context) error
- func (h *Handler) DraftsDelete(c *echo.Context) error
- func (h *Handler) DraftsList(c *echo.Context) error
- func (h *Handler) DraftsUpdate(c *echo.Context) error
- func (h *Handler) EnableTimelineJSONCache(ttl time.Duration)
- func (h *Handler) FavoritesCreate(c *echo.Context) error
- func (h *Handler) FavoritesDelete(c *echo.Context) error
- func (h *Handler) Featured(c *echo.Context) error
- func (h *Handler) FeaturedRankingCache() *FeaturedRankingCache
- func (h *Handler) GlobalTimeline(c *echo.Context) error
- func (h *Handler) HybridTimeline(c *echo.Context) error
- func (h *Handler) LocalTimeline(c *echo.Context) error
- func (h *Handler) Mentions(c *echo.Context) error
- func (h *Handler) PackForEmbed(ctx context.Context, n *model.Note) entity.NoteEntity
- func (h *Handler) PollsRecommendation(c *echo.Context) error
- func (h *Handler) PollsVote(c *echo.Context) error
- func (h *Handler) Reactions(c *echo.Context) error
- func (h *Handler) ReactionsCreate(c *echo.Context) error
- func (h *Handler) ReactionsDelete(c *echo.Context) error
- func (h *Handler) Renotes(c *echo.Context) error
- func (h *Handler) Replies(c *echo.Context) error
- func (h *Handler) Search(c *echo.Context) error
- func (h *Handler) SearchByTag(c *echo.Context) error
- func (h *Handler) SetAchievementGranter(g AchievementGranter)
- func (h *Handler) SetBackground(g *bgwork.Group)
- func (h *Handler) SetChannelFollowingRepo(r repository.ChannelFollowingRepository)
- func (h *Handler) SetChannelRepo(r repository.ChannelRepository)
- func (h *Handler) SetClipRepos(clip repository.ClipRepository, clipNote repository.ClipNoteRepository, ...)
- func (h *Handler) SetDraftRepo(r repository.NoteDraftRepository)
- func (h *Handler) SetEmojiRepo(r repository.EmojiRepository)
- func (h *Handler) SetFavoriteRepo(r repository.NoteFavoriteRepository)
- func (h *Handler) SetFeaturedRanking(r FeaturedRankingReader)
- func (h *Handler) SetInstanceRepo(r repository.InstanceRepository)
- func (h *Handler) SetLocalFederationObserver(observer activitypub.LocalFederationObserver)
- func (h *Handler) SetModeratorChecker(m ModeratorChecker)
- func (h *Handler) SetNoteDeliveryRules(r *notedelivery.Registry)
- func (h *Handler) SetNoteMaterializer(m NoteMaterializer)
- func (h *Handler) SetPiningRepo(r repository.UserNotePiningRepository)
- func (h *Handler) SetPollRepo(r repository.PollRepository)
- func (h *Handler) SetReactionReader(r entity.BufferedReactionsReader)
- func (h *Handler) SetRelationCache(rc *repository.RelationCache)
- func (h *Handler) SetScheduledNoteEnqueuer(e ScheduledNoteEnqueuer)
- func (h *Handler) SetThreadMutingRepo(r repository.NoteThreadMutingRepository)
- func (h *Handler) SetTranslator(t translate.Translator)
- func (h *Handler) SetUserListRepo(r repository.UserListRepository)
- func (h *Handler) SetUserRepo(r repository.UserRepository)
- func (h *Handler) Show(c *echo.Context) error
- func (h *Handler) ShowPartialBulk(c *echo.Context) error
- func (h *Handler) State(c *echo.Context) error
- func (h *Handler) ThreadMutingCreate(c *echo.Context) error
- func (h *Handler) ThreadMutingDelete(c *echo.Context) error
- func (h *Handler) Timeline(c *echo.Context) error
- func (h *Handler) TimelineJSONCache() *TimelineJSONCache
- func (h *Handler) Translate(c *echo.Context) error
- func (h *Handler) Unrenote(c *echo.Context) error
- func (h *Handler) UserListTimeline(c *echo.Context) error
- type ModeratorChecker
- type NoteMaterializer
- type PollRequest
- type PollVoteRequest
- type ReactionCreateRequest
- type ReactionDeleteRequest
- type ReactionsListRequest
- type ScheduledNoteEnqueuer
- type SearchRequest
- type ShowRequest
- type TimelineJSONCache
- type TimelineRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AchievementGranter ¶
AchievementGranter unlocks a server-side achievement for a user. core/achievement.Service implements it. Used by notes/favorites/create to grant myNoteFavorited1 (#1762).
type ConversationRequest ¶
type ConversationRequest struct {
NoteID string `json:"noteId"`
Limit *jsnum.Int `json:"limit"`
Offset jsnum.Int `json:"offset"`
}
ConversationRequest is the request body for notes/conversation.
type CreateRequest ¶
type CreateRequest struct {
Visibility string `json:"visibility"`
VisibleUserIDs []string `json:"visibleUserIds"`
CW *string `json:"cw"`
Text *string `json:"text"`
LocalOnly bool `json:"localOnly"`
ReactionAcceptance *string `json:"reactionAcceptance"`
FileIDs []string `json:"fileIds"`
// MediaIDs は fileIds の別名 (upstream は fileIds ?? mediaIds、#1538)。
MediaIDs []string `json:"mediaIds"`
ReplyID *string `json:"replyId"`
RenoteID *string `json:"renoteId"`
ChannelID *string `json:"channelId"`
Poll *PollRequest `json:"poll"`
// noExtract* は mention/hashtag/emoji の自動抽出を抑止する (#1538)。
NoExtractMentions bool `json:"noExtractMentions"`
NoExtractEmojis bool `json:"noExtractEmojis"`
// PluginOptions is an Elythia extension (#4199): each entry
// is handed, unread, to the plugin it names (plugin.NoteDeliveryRegistration.Prepare)
// before the note is stored.
PluginOptions map[string]json.RawMessage `json:"pluginOptions"`
}
CreateRequest is the request body for notes/create.
type DeleteRequest ¶
type DeleteRequest struct {
NoteID string `json:"noteId"`
}
DeleteRequest is the request body for notes/delete.
type FeaturedRankingCache ¶
type FeaturedRankingCache struct {
// contains filtered or unexported fields
}
FeaturedRankingCache holds the 30-min global ranking cache.
func (*FeaturedRankingCache) DropLocal ¶
func (c *FeaturedRankingCache) DropLocal()
DropLocal drops the cached global ranking held by this process (#3736). 読み込みの間も mu を握るので (cachedGlobalRanking)、捨てる前に始まった読み込みは 待ってから捨てる。
type FeaturedRankingReader ¶
type FeaturedRankingReader interface {
GetGlobalNotesRanking(ctx context.Context, threshold int) ([]string, error)
GetInChannelNotesRanking(ctx context.Context, channelID string, threshold int) ([]string, error)
}
FeaturedRankingReader reads the engagement ranking for notes/featured (#1687). 循環依存回避のため narrow interface (実装は core/featured.Service)。
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles note-related API endpoints.
func NewHandler ¶
func NewHandler( noteRepo repository.NoteRepository, createService *note.CreateService, deleteService *note.DeleteService, queryService *note.QueryService, timelineService *timeline.Service, reactionService *reaction.Service, pollService *poll.Service, searchService *search.Service, idGen id.Generator, noteHider *notehide.Hider, entityPacker *entity.Packer, noteFieldResolver *entity.NoteFieldResolver, policyProvider role.PolicyProvider, ugcVisibility func() string, driveFileRepo repository.DriveFileRepository, metaRepo repository.MetaRepository, blockingRepo repository.BlockingRepository, mutingRepo repository.MutingRepository, renoteMutingRepo repository.RenoteMutingRepository, channelMutingRepo repository.ChannelMutingRepository, userFollowingRepo repository.FollowingRepository, ) *Handler
NewHandler creates a new notes Handler. queryService/timelineService/reactionService/pollService/searchService が nil の場合、それぞれの依存に対応するエンドポイントは利用不可となる (テストで一部だけ初期化する用途を許容する)。
noteHider, entityPacker, policyProvider and ugcVisibility gate what a viewer may see. ugcVisibility is called on every request, so a change in the admin panel takes effect without a restart. noteFieldResolver fills the attached files, the viewer's reaction and poll votes, and the channel of the packed notes; pass the resolver shared by the other handlers. The repositories from driveFileRepo to userFollowingRepo back the per-viewer filters (blocked hosts, blocks, mutes, renote mutes, channel mutes and the followers-only reply guard) and the draft attachments (their ownership check and their files in draft responses).
func (*Handler) BulkShow ¶
BulkShow handles POST /api/notes.
#2106 L4 / #2215: hybrid endpoint。upstream notes.ts は {local,reply,renote,withFiles, poll,limit,sinceId/untilId/sinceDate/untilDate} で public(visibility=public, localOnly=FALSE) note の一覧を時系列ページングする公開タイムライン的 endpoint。mk-go は 加えて独自拡張の noteIds bulk lookup も同 endpoint で受ける: noteIds 指定時は bulk (visibility filter 付き)、不在時は upstream 互換の public note 一覧を返す。これで misskey-js SDK の {local:true,limit:30} 呼び出しも、既存の {noteIds:[...]} 呼び出しも 両立する。
func (*Handler) Clips ¶
Clips handles POST /api/notes/clips.
upstream notes/clips.ts: getNote で note 存在確認 (無ければ NO_SUCH_NOTE) → clipNotesRepository.findBy({noteId}) で note を含む clip を引き → clipsRepository.findBy({id IN, isPublic:true}) → clipEntityService.packMany。 owner / 他人を問わず「その note を含む public clip」を返す (#1554)。
func (*Handler) Conversation ¶
Conversation handles POST /api/notes/conversation.
func (*Handler) DraftsCount ¶
DraftsCount handles POST /api/notes/drafts/count.
func (*Handler) DraftsCreate ¶
DraftsCreate handles POST /api/notes/drafts/create. upstream `notes/drafts/create.ts` 互換で scheduledAt / isActuallyScheduled を受け入れ、scheduledNoteLimit policy gate + 遅延 queue enqueue を行う (#1040)。
func (*Handler) DraftsDelete ¶
DraftsDelete handles POST /api/notes/drafts/delete.
func (*Handler) DraftsList ¶
DraftsList handles POST /api/notes/drafts/list.
func (*Handler) DraftsUpdate ¶
DraftsUpdate handles POST /api/notes/drafts/update. scheduledAt / isActuallyScheduled の変更を upstream `notes/drafts/update` と同 logic で取り扱い、変更があれば旧 delayed task を clear → 必要なら 新 scheduledAt で再 enqueue する (#1045 Phase 2-C)。
func (*Handler) EnableTimelineJSONCache ¶
EnableTimelineJSONCache turns on the first-page timeline response cache with the given TTL. config flag enableTimelineCache (MK_ENABLETIMELINECACHE) 経由で server 配線から呼ぶ。
func (*Handler) FavoritesCreate ¶
FavoritesCreate handles POST /api/notes/favorites/create.
func (*Handler) FavoritesDelete ¶
FavoritesDelete handles POST /api/notes/favorites/delete.
func (*Handler) Featured ¶
Featured handles POST /api/notes/featured.
注目ノート — renoteCount + repliesCount が高いノートを返す簡易版。 channelId 指定時は該当チャンネル内のノートだけを返す (channel.vue の ハイライトタブから叩かれる経路)。過去はこの絞り込みが無く、無関係な グローバルノートが混ざっていた (#489)。untilId は cursor pagination 用。
func (*Handler) FeaturedRankingCache ¶
func (h *Handler) FeaturedRankingCache() *FeaturedRankingCache
FeaturedRankingCache returns the cache of the global featured ranking, for the server's cache list (#3736).
func (*Handler) GlobalTimeline ¶
GlobalTimeline handles POST /api/notes/global-timeline.
func (*Handler) HybridTimeline ¶
HybridTimeline handles POST /api/notes/hybrid-timeline.
func (*Handler) LocalTimeline ¶
LocalTimeline handles POST /api/notes/local-timeline.
func (*Handler) PackForEmbed ¶
PackForEmbed packs a note for the anonymous embed page (#2389).
viewer は nil 固定。埋め込みは認証を伴わないので、閲覧者依存のフィールドを 解決してはいけない。packReferencedNote を経由するのは、可視性の判断を **既存の 1 箇所に寄せる**ため。ここで独自に判定を書くと、CanSee / HideEmbeds に後から入る修正が embed だけ取り残される。
viewer=nil のとき queryService.CanSee は public / home 以外を false にし、 HideEmbeds は renote / reply の埋め込みを同じ深さで gate する。
func (*Handler) PollsRecommendation ¶
PollsRecommendation handles POST /api/notes/polls/recommendation.
旧実装は常に [] を返すスタブだった (#1538)。本家 recommendation.ts 同様、 ローカル public で未期限切れの poll のうち、自分の投稿でない / 未投票 / 投稿者を mute していないものを noteId DESC で返す (excludeChannels で チャンネル poll を除外可)。可視性は public 限定なので追加 gate は不要。
func (*Handler) ReactionsCreate ¶
ReactionsCreate handles POST /api/notes/reactions/create.
func (*Handler) ReactionsDelete ¶
ReactionsDelete handles POST /api/notes/reactions/delete.
func (*Handler) SearchByTag ¶
SearchByTag handles POST /api/notes/search-by-tag. TS互換: tag (string) または query (string[][] — 外側 OR・内側 AND の複合タグ 検索) を受け付ける (#1683、upstream search-by-tag.ts)。tag が指定されれば 単一タグ、無ければ query を OR-of-AND で検索する。
func (*Handler) SetAchievementGranter ¶
func (h *Handler) SetAchievementGranter(g AchievementGranter)
SetAchievementGranter wires the achievement grant service. When unset, favorite-driven achievements are simply not granted (degrade).
func (*Handler) SetBackground ¶
SetBackground wires the group of the server generation (#3661) that runs the cleanup of forgetUnfederatedNote, so stopping the generation waits for it. nil runs plain goroutines.
func (*Handler) SetChannelFollowingRepo ¶
func (h *Handler) SetChannelFollowingRepo(r repository.ChannelFollowingRepository)
SetChannelFollowingRepo attaches a ChannelFollowingRepository so the home timeline includes notes from channels the viewer follows (#1686).
func (*Handler) SetChannelRepo ¶
func (h *Handler) SetChannelRepo(r repository.ChannelRepository)
SetChannelRepo attaches a ChannelRepository for the channel checks and the channel summary of note drafts.
func (*Handler) SetClipRepos ¶
func (h *Handler) SetClipRepos(clip repository.ClipRepository, clipNote repository.ClipNoteRepository, clipFavorite repository.ClipFavoriteRepository)
SetClipRepos wires the clip repos used by notes/clips (#1554)。未配線時は 旧 stub 同様に空配列を返す。
func (*Handler) SetDraftRepo ¶
func (h *Handler) SetDraftRepo(r repository.NoteDraftRepository)
SetDraftRepo attaches a NoteDraftRepository for draft operations.
func (*Handler) SetEmojiRepo ¶
func (h *Handler) SetEmojiRepo(r repository.EmojiRepository)
SetEmojiRepo attaches an EmojiRepository so custom emoji shortcodes in note text and user displayNames get resolved to URLs (#330).
func (*Handler) SetFavoriteRepo ¶
func (h *Handler) SetFavoriteRepo(r repository.NoteFavoriteRepository)
SetFavoriteRepo attaches a NoteFavoriteRepository for favorites endpoints.
func (*Handler) SetFeaturedRanking ¶
func (h *Handler) SetFeaturedRanking(r FeaturedRankingReader)
SetFeaturedRanking wires the engagement ranking reader so notes/featured uses it (#1687). nil 注入時は SQL count-DESC fallback。
func (*Handler) SetInstanceRepo ¶
func (h *Handler) SetInstanceRepo(r repository.InstanceRepository)
SetInstanceRepo attaches an InstanceRepository so remote user embeds in note responses get their `instance` field populated (#277).
func (*Handler) SetLocalFederationObserver ¶
func (h *Handler) SetLocalFederationObserver(observer activitypub.LocalFederationObserver)
func (*Handler) SetModeratorChecker ¶
func (h *Handler) SetModeratorChecker(m ModeratorChecker)
SetModeratorChecker wires the moderator check used by notes/delete.
func (*Handler) SetNoteDeliveryRules ¶
func (h *Handler) SetNoteDeliveryRules(r *notedelivery.Registry)
SetNoteDeliveryRules wires the plugins that receive notes/create pluginOptions (#4199).
func (*Handler) SetNoteMaterializer ¶
func (h *Handler) SetNoteMaterializer(m NoteMaterializer)
SetNoteMaterializer attaches the ephemeral-note materializer. Optional.
func (*Handler) SetPiningRepo ¶
func (h *Handler) SetPiningRepo(r repository.UserNotePiningRepository)
SetPiningRepo wires the repository used to verify that a notes/show target is still pinned at request time.
func (*Handler) SetPollRepo ¶
func (h *Handler) SetPollRepo(r repository.PollRepository)
SetPollRepo attaches a PollRepository used by notes/polls/recommendation (#1538).
func (*Handler) SetReactionReader ¶
func (h *Handler) SetReactionReader(r entity.BufferedReactionsReader)
SetReactionReader wires a BufferedReactionsReader so PackNote / PackNotes can merge in-flight buffered reaction deltas (#647)。enableReactionsBuffering が無効なら nil でも構わない。
func (*Handler) SetRelationCache ¶
func (h *Handler) SetRelationCache(rc *repository.RelationCache)
SetRelationCache wires the per-user relation cache (#3607). The timeline and the post-fetch mute / block filter read the viewer's mute, block, follow and channel lists from it instead of the repositories. nil keeps reading the repositories.
func (*Handler) SetScheduledNoteEnqueuer ¶
func (h *Handler) SetScheduledNoteEnqueuer(e ScheduledNoteEnqueuer)
SetScheduledNoteEnqueuer wires a delayed queue client used by drafts/create when the request asks for a scheduled publish (#1040). nil disables the enqueue path (= test fixture / unwired)。
func (*Handler) SetThreadMutingRepo ¶
func (h *Handler) SetThreadMutingRepo(r repository.NoteThreadMutingRepository)
SetThreadMutingRepo wires the NoteThreadMutingRepository used by the thread-muting create/delete endpoints (#1538). The notes/state read path is wired separately on the query service.
func (*Handler) SetTranslator ¶
func (h *Handler) SetTranslator(t translate.Translator)
SetTranslator attaches the translator for /api/notes/translate. A translator that returns translate.ErrNotConfigured makes the endpoint answer UNAVAILABLE.
func (*Handler) SetUserListRepo ¶
func (h *Handler) SetUserListRepo(r repository.UserListRepository)
SetUserListRepo attaches a UserListRepository for user-list-timeline.
func (*Handler) SetUserRepo ¶
func (h *Handler) SetUserRepo(r repository.UserRepository)
SetUserRepo attaches a UserRepository for the viewer's mute settings (hardMutedWords and the mute / block sets) and for looking up clip owners and note authors.
func (*Handler) ShowPartialBulk ¶
ShowPartialBulk handles POST /api/notes/show-partial-bulk.
func (*Handler) ThreadMutingCreate ¶
ThreadMutingCreate handles POST /api/notes/thread-muting/create.
旧実装は noteId 検証後 204 を返すだけで note_thread_muting に永続化しておらず (notes/state の isMutedThread 読み取り経路は実装済みなのに) スレッドミュートが 機能していなかった (#1538)。本家 thread-muting/create.ts 同様 note を解決し (可視性 gate 無し)、threadId(無ければ id)で冪等に muting 行を作る。
func (*Handler) ThreadMutingDelete ¶
ThreadMutingDelete handles POST /api/notes/thread-muting/delete.
func (*Handler) TimelineJSONCache ¶
func (h *Handler) TimelineJSONCache() *TimelineJSONCache
TimelineJSONCache returns the first-page timeline response cache, or nil when EnableTimelineJSONCache was not called (#3736).
type ModeratorChecker ¶
ModeratorChecker reports whether a user holds moderator / administrator privileges. core/role.Service implements it. Used by notes/delete to let a moderator delete other users' notes (#1538).
type NoteMaterializer ¶
type NoteMaterializer interface {
EnsureNote(ctx context.Context, noteID string) (*model.Note, error)
}
NoteMaterializer promotes a relay-delivered note out of the ephemeral store into a real database row (#2332)。実装は core/ephemeral.Materializer。
type PollRequest ¶
type PollRequest struct {
Choices []string `json:"choices"`
Multiple bool `json:"multiple"`
ExpiresAt *jsnum.Int `json:"expiresAt"`
ExpiredAfter *jsnum.Int `json:"expiredAfter"`
}
PollRequest is the poll part of a create note request.
expiresAt と expiredAfter は宣言で integer なので、本家の ajv と同じく 10.0 も 受ける (#3884。下書きの handler_drafts.go と同じ)。
type PollVoteRequest ¶
PollVoteRequest is the request body for notes/polls/vote.
type ReactionCreateRequest ¶
type ReactionCreateRequest struct {
NoteID string `json:"noteId"`
// 欠落 (キー無し) と空文字を区別する。upstream の paramDef は
// `reaction: {type:'string'}` を required にするだけで minLength が無く、
// 空文字は valid な入力として ReactionService.normalize が ❤ に倒す。
Reaction *string `json:"reaction"`
}
ReactionCreateRequest is the request body for notes/reactions/create.
type ReactionDeleteRequest ¶
type ReactionDeleteRequest struct {
NoteID string `json:"noteId"`
}
ReactionDeleteRequest is the request body for notes/reactions/delete.
type ReactionsListRequest ¶
type ReactionsListRequest struct {
NoteID string `json:"noteId" query:"noteId"`
Type string `json:"type" query:"type"`
Limit *jsnum.Int `json:"limit" query:"limit"`
SinceID string `json:"sinceId" query:"sinceId"`
UntilID string `json:"untilId" query:"untilId"`
SinceDate *jsnum.Int `json:"sinceDate" query:"sinceDate"`
UntilDate *jsnum.Int `json:"untilDate" query:"untilDate"`
}
ReactionsListRequest is the request body for notes/reactions.
type ScheduledNoteEnqueuer ¶
type ScheduledNoteEnqueuer interface {
EnqueuePostScheduledNote(payload queue.PostScheduledNotePayload, opts ...driver.EnqueueOption) error
ClearScheduledNote(draftID string) error
}
ScheduledNoteEnqueuer abstracts the delayed enqueue path used by drafts/create. Implemented by *queue.Client (= EnqueuePostScheduledNote)。
type SearchRequest ¶
type SearchRequest struct {
Query string `json:"query"`
Limit *jsnum.Int `json:"limit"`
Offset jsnum.Int `json:"offset"`
SinceID string `json:"sinceId"`
UntilID string `json:"untilId"`
SinceDate *jsnum.Int `json:"sinceDate"`
UntilDate *jsnum.Int `json:"untilDate"`
UserID string `json:"userId"`
ChannelID string `json:"channelId"`
Host string `json:"host"`
// rangeStartAt / rangeEndAt は投稿日時範囲 (epoch ms、upstream #16119 #2069)。
// sinceDate/untilDate (cursor 正規化用) とは別物で、cursor と独立に AND される。
RangeStartAt *jsnum.Int `json:"rangeStartAt"`
RangeEndAt *jsnum.Int `json:"rangeEndAt"`
}
SearchRequest is the request body for notes/search.
Misskey 本家と互換のフィールド構成。`sinceDate` / `untilDate` (unix milli) が指定されたときは ID generator で対応する note ID に変換し、`sinceId` / `untilId` のフォールバックとして使う。`host == "."` はローカル限定検索。
type ShowRequest ¶
type ShowRequest struct {
NoteID string `json:"noteId"`
}
ShowRequest is the request body for notes/show.
type TimelineJSONCache ¶
type TimelineJSONCache struct {
// contains filtered or unexported fields
}
TimelineJSONCache is a bounded in-memory TTL cache of marshaled timeline responses. 単一 process 内のみ (multi-process では process ごとに別 cache だが 応答の正しさは保たれる)。
func (*TimelineJSONCache) DropLocal ¶
func (c *TimelineJSONCache) DropLocal()
DropLocal drops every cached response held by this process (#3736). Other processes are not told.
type TimelineRequest ¶
type TimelineRequest struct {
Limit *jsnum.Int `json:"limit"`
SinceID string `json:"sinceId"`
UntilID string `json:"untilId"`
SinceDate *jsnum.Int `json:"sinceDate"`
UntilDate *jsnum.Int `json:"untilDate"`
WithFiles bool `json:"withFiles"`
WithRenotes *bool `json:"withRenotes"`
WithReplies *bool `json:"withReplies"`
IncludeMyRenotes *bool `json:"includeMyRenotes"`
IncludeRenotedMyNotes *bool `json:"includeRenotedMyNotes"`
IncludeLocalRenotes *bool `json:"includeLocalRenotes"`
AllowPartial bool `json:"allowPartial"`
// contains filtered or unexported fields
}
TimelineRequest is the common request body for the four timeline endpoints.