A community based topic aggregation platform built on atproto
1//go:build !dev
2
3package oauth
4
5import (
6 "context"
7
8 "github.com/bluesky-social/indigo/atproto/identity"
9)
10
11// DevHandleResolver is a stub for production builds.
12// The actual implementation is in dev_resolver.go (only compiled with -tags dev).
13type DevHandleResolver struct{}
14
15// NewDevHandleResolver returns nil in production builds.
16// Dev mode features are only available when built with -tags dev.
17func NewDevHandleResolver(pdsURL string, allowPrivateIPs bool) *DevHandleResolver {
18 return nil
19}
20
21// ResolveHandle is a stub that should never be called in production.
22// The nil check in handlers.go prevents this from being reached.
23func (r *DevHandleResolver) ResolveHandle(ctx context.Context, handle string) (string, error) {
24 panic("dev mode: ResolveHandle called in production build - this should never happen")
25}
26
27// DevAuthResolver is a stub for production builds.
28// The actual implementation is in dev_auth_resolver.go (only compiled with -tags dev).
29type DevAuthResolver struct{}
30
31// NewDevAuthResolver returns nil in production builds.
32// Dev mode features are only available when built with -tags dev.
33func NewDevAuthResolver(pdsURL string, allowPrivateIPs bool) *DevAuthResolver {
34 return nil
35}
36
37// StartDevAuthFlow is a stub that should never be called in production.
38// The nil check in handlers.go prevents this from being reached.
39func (r *DevAuthResolver) StartDevAuthFlow(ctx context.Context, client *OAuthClient, identifier string, dir identity.Directory) (string, error) {
40 panic("dev mode: StartDevAuthFlow called in production build - this should never happen")
41}