19 lines
398 B
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)
|
|
}
|