| 20 | const maxAPIRequestBytes = 256 << 20 |
| 21 | |
| 22 | type APIV1Service struct { |
| 23 | v1pb.UnimplementedInstanceServiceServer |
| 24 | v1pb.UnimplementedAuthServiceServer |
| 25 | v1pb.UnimplementedUserServiceServer |
| 26 | v1pb.UnimplementedMemoServiceServer |
| 27 | v1pb.UnimplementedAttachmentServiceServer |
| 28 | v1pb.UnimplementedAIServiceServer |
| 29 | v1pb.UnimplementedShortcutServiceServer |
| 30 | v1pb.UnimplementedIdentityProviderServiceServer |
| 31 | |
| 32 | Secret string |
| 33 | Profile *profile.Profile |
| 34 | Store *store.Store |
| 35 | MarkdownService markdown.Service |
| 36 | SSEHub *SSEHub |
| 37 | NotificationEmailSender notification.EmailSender |
| 38 | |
| 39 | // thumbnailSemaphore limits concurrent thumbnail generation to prevent memory exhaustion |
| 40 | thumbnailSemaphore *semaphore.Weighted |
| 41 | imageProcessingSemaphore *semaphore.Weighted |
| 42 | |
| 43 | // instanceStatsCache memoizes GetInstanceStats results for instanceStatsCacheTTL. |
| 44 | instanceStatsCache instanceStatsCache |
| 45 | } |
| 46 | |
| 47 | func NewAPIV1Service(secret string, profile *profile.Profile, store *store.Store) *APIV1Service { |
| 48 | markdownService := markdown.NewService( |
nothing calls this directly
no outgoing calls
no test coverage detected