package product import "context" // SelfSubscribePolicy 是否允许用户在控制台自助发起「订阅产品」 type SelfSubscribePolicy interface { Allow(ctx context.Context, userID string) (allowed bool, message string, err error) } // DefaultAllowSelfSubscribe 未装配下属模块时:恒允许 type DefaultAllowSelfSubscribe struct{} // Allow 恒允许 func (DefaultAllowSelfSubscribe) Allow(_ context.Context, _ string) (bool, string, error) { return true, "", nil }