Something went wrong. Try again.
A community based topic aggregation platform built on atproto
Something went wrong. Try again.
2.0 kB · 50 lines
Go
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051package moderation
import ( "context"
"Coves/internal/core/comments" "Coves/internal/core/posts")
// Authority answers whether a DID may act as an instance admin.type Authority interface { IsInstanceAdmin(did string) bool}
// SubjectReader reports what the AppView has indexed for a subject URI.// It returns ErrSubjectNotIndexed for a URI the AppView has never seen.type SubjectReader interface { ReadSubject(ctx context.Context, uri string) (*IndexedRecord, error)}
// PostReader is the ungated post lookup the reader adapter needs.type PostReader interface { GetRawIndexedRow(ctx context.Context, uri string) (*posts.Post, error)}
// CommentReader is the admission-blind comment lookup the reader adapter needs.type CommentReader interface { GetByURI(ctx context.Context, uri string) (*comments.Comment, error)}
// Service is the moderation domain's read and mutation surface.type Service interface { GetSubjectState(ctx context.Context, subject string) (*SubjectState, error) RemoveContent(ctx context.Context, actorDID string, request RemoveContentRequest) (*MutationResult, error) RestoreContent(ctx context.Context, actorDID string, request RestoreContentRequest) (*MutationResult, error) LabelContent(ctx context.Context, actorDID string, request LabelContentRequest) (*MutationResult, error) RetractContentLabel(ctx context.Context, actorDID string, request RetractContentLabelRequest) (*MutationResult, error) ListActions(ctx context.Context, params ListActionsParams) (*ActionPage, error) ListAdminActions(ctx context.Context, params ListAdminActionsParams) (*AdminActionPage, error)}
// CommunityResolver resolves a community identifier to its DID.type CommunityResolver interface { ResolveCommunityIdentifier(ctx context.Context, identifier string) (string, error)}
// HandleResolver resolves an account handle to its DID.type HandleResolver interface { ResolveHandle(ctx context.Context, handle string) (did, pdsURL string, err error)}