Files
sub2api-cn-relay-manager/internal/access/planner.go

19 lines
398 B
Go

package access
import (
"context"
"strings"
)
type closurePlan struct {
probeAPIKey string
}
func (s *Service) prepareClosurePlan(ctx context.Context, req ClosureRequest) (closurePlan, error) {
plan := closurePlan{probeAPIKey: strings.TrimSpace(req.ProbeAPIKey)}
if strings.TrimSpace(req.Mode) != ModeSubscription {
return plan, nil
}
return s.prepareSubscriptionPlan(ctx, req, plan)
}